mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-21 04:18:58 +00:00
Bootstrap: Make sure that _env_root is an absolute path
If the environment variable $WA_USER_DIRECTORY is not set `_env_root` is automatically generated from the path expansion of `~`. In some cases if a home directory is not avaliable for the user this may result in an empty string. This commit ensure that '_env_root' is still an absolute path using the current working directory.
This commit is contained in:
parent
16b302679a
commit
8dcf1ba6a5
@ -176,6 +176,7 @@ def init_environment(env_root, dep_dir, extension_paths, overwrite_existing=Fals
|
||||
|
||||
|
||||
_env_root = os.getenv('WA_USER_DIRECTORY', os.path.join(_user_home, '.workload_automation'))
|
||||
_env_root = os.path.abspath(_env_root)
|
||||
_dep_dir = os.path.join(_env_root, 'dependencies')
|
||||
_extension_paths = [os.path.join(_env_root, ext.default_path) for ext in _extensions]
|
||||
_env_var_paths = os.getenv('WA_EXTENSION_PATHS', '')
|
||||
|
Loading…
x
Reference in New Issue
Block a user