mirror of https://github.com/openspug/spug
U 优化发布读取环境变量规则
parent
e36897d3fc
commit
1ebc947d5c
|
@ -290,6 +290,8 @@ class Helper:
|
||||||
self._send({'key': key, 'step': step, 'data': data})
|
self._send({'key': key, 'step': step, 'data': data})
|
||||||
|
|
||||||
def local(self, command, env=None):
|
def local(self, command, env=None):
|
||||||
|
if env:
|
||||||
|
env = os.environ.copy().update(env)
|
||||||
command = 'set -e\n' + command
|
command = 'set -e\n' + command
|
||||||
task = subprocess.Popen(command, env=env, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
task = subprocess.Popen(command, env=env, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
while True:
|
while True:
|
||||||
|
|
Loading…
Reference in New Issue