diff options
| author | James Pic <jpic@yourlabs.org> | 2021-06-02 09:42:35 +0200 |
|---|---|---|
| committer | jpic <jpic@yourlabs.org> | 2021-06-07 11:46:58 +0200 |
| commit | db78657c231663f3e8ebbc18de43c06ddaa94c97 (patch) | |
| tree | f556aec2f9bef885f27e25a9ce6894c192e592d8 /kolla/image/build.py | |
| parent | 5338b559ea12af998d89da3f339788a18e775dcd (diff) | |
| download | kolla-db78657c231663f3e8ebbc18de43c06ddaa94c97.tar.gz kolla-db78657c231663f3e8ebbc18de43c06ddaa94c97.zip | |
Fix _get_images_dir when pip-installed with --user
There are two cases where pip installs kolla share into ~/.local/share/kolla:
- with `pip install --user kolla`
- with `pip install kolla` as non-root
This patch helps kolla find the share dir in these cases.
Closes-Bug: #1930544
Change-Id: I0b3eb6744a34a601266179fb358510a5c500e6ba
Diffstat (limited to 'kolla/image/build.py')
| -rwxr-xr-x | kolla/image/build.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kolla/image/build.py b/kolla/image/build.py index 40cf93c3c..0e76ac919 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -753,6 +753,7 @@ class KollaWorker(object): PROJECT_ROOT, os.path.join(sys.prefix, 'share/kolla'), os.path.join(sys.prefix, 'local/share/kolla'), + os.path.join(os.getenv('HOME', ''), '.local/share/kolla'), # NOTE(zioproto): When Kolla is used within a snap, the env var # $SNAP is the directory where the snap is mounted. # https://github.com/zioproto/snap-kolla |
