Fix cond comp environment setup (#4290)

source command may not be available in sh.
This commit is contained in:
Andrey Somsikov
2021-02-11 21:29:46 +03:00
committed by GitHub
parent 3eb0b5c90d
commit 9d57d4f52c

View File

@@ -21,7 +21,7 @@ def get_env_from(script):
if sys.platform == "win32":
cmd = f'"{script}" && set'
else:
cmd = f'source "{script}" && env'
cmd = f'. "{script}" && env'
dump = subprocess.check_output(cmd, shell=True, universal_newlines=True).strip()
for line in dump.split("\n"):
# split by first '='