diff options
author | Daniel Moody <daniel.moody@mongodb.com> | 2022-05-09 22:13:56 (GMT) |
---|---|---|
committer | Daniel Moody <daniel.moody@mongodb.com> | 2022-05-09 22:13:56 (GMT) |
commit | cc811439cbb2a8b57d8626b1dec360ea37eb0ace (patch) | |
tree | d16b41e3965ee468f7ad917c0f9605702f3ce69a /SCons/Action.py | |
parent | 9e579ada17bfecc4728a61ece53bfe8781652e5a (diff) | |
download | SCons-cc811439cbb2a8b57d8626b1dec360ea37eb0ace.zip SCons-cc811439cbb2a8b57d8626b1dec360ea37eb0ace.tar.gz SCons-cc811439cbb2a8b57d8626b1dec360ea37eb0ace.tar.bz2 |
added way for user to configure shell envronment before its executed.
Diffstat (limited to 'SCons/Action.py')
-rw-r--r-- | SCons/Action.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/SCons/Action.py b/SCons/Action.py index 81dc033..0110299 100644 --- a/SCons/Action.py +++ b/SCons/Action.py @@ -799,25 +799,25 @@ def _subproc(scons_env, cmd, error='ignore', **kw): if error == 'raise': raise # return a dummy Popen instance that only returns error class dummyPopen: - def __init__(self, e): + def __init__(self, e): self.exception = e # Add the following two to enable using the return value as a context manager - # for example + # for example # with Action._subproc(...) as po: # logic here which uses po - def __enter__(self): + def __enter__(self): return self - def __exit__(self, *args): + def __exit__(self, *args): pass - def communicate(self, input=None): + def communicate(self, input=None): return ('', '') - def wait(self): + def wait(self): return -self.exception.errno - + stdin = None class f: def read(self): return '' @@ -924,7 +924,7 @@ class CommandAction(_ActionAction): escape = env.get('ESCAPE', lambda x: x) - ENV = get_default_ENV(env) + ENV = env.get('SHELL_ENV_EXPANDER', get_default_ENV)(env) # Ensure that the ENV values are all strings: for key, value in ENV.items(): |