mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 22:54:16 +02:00
[commons] improvement: allowing extra environments variables to redefine existing values (SimpleProcess)
This commit is contained in:
@@ -96,8 +96,7 @@ class SimpleProcess:
|
||||
|
||||
if extra_env:
|
||||
for var, val in extra_env.items():
|
||||
if var not in env:
|
||||
env[var] = val
|
||||
env[var] = val
|
||||
|
||||
args = {
|
||||
"stdout": subprocess.PIPE,
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user