[commons] improvement: allowing extra environments variables to redefine existing values (SimpleProcess)

This commit is contained in:
Vinicius Moreira
2022-04-07 12:05:41 -03:00
parent 262e834a75
commit 6d29da6373
2 changed files with 3 additions and 3 deletions

View File

@@ -20,8 +20,9 @@ def install(url: str, name: str, output_dir: str, electron_version: Optional[str
if extra_options:
cmd.extend(extra_options)
extra_env = {'XDG_CACHE_HOME': os.path.dirname(ELECTRON_CACHE_DIR)} if not os.getenv('XDG_CACHE_HOME') else None
return SimpleProcess(cmd, cwd=cwd, extra_paths=NODE_PATHS if not system else None,
extra_env={'XDG_CACHE_HOME': os.path.dirname(ELECTRON_CACHE_DIR)})
extra_env=extra_env)
def is_available() -> bool: