mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-28 17:57:16 +02:00
[root] fix add env to path
This commit is contained in:
parent
bab908d2eb
commit
68162e16a4
1 changed files with 6 additions and 1 deletions
|
@ -78,7 +78,12 @@ def setupEnvironment():
|
|||
if not isinstance(val, (list, tuple)):
|
||||
val = [val]
|
||||
|
||||
paths[index:index] = val
|
||||
if index == -1:
|
||||
paths.extend(val)
|
||||
elif index == 0:
|
||||
paths = val + paths
|
||||
else:
|
||||
raise ValueError("addToEnvPath: index must be -1 or 0.")
|
||||
os.environ[var] = os.pathsep.join(paths)
|
||||
|
||||
# setup root directory (override possible by setting "MESHROOM_INSTALL_DIR" environment variable)
|
||||
|
|
Loading…
Add table
Reference in a new issue