build.run: use correct working directory in BuildPlan.execute_local
.
This regression was introduced in commit 3200a3961
. Fixes #1020.
This commit is contained in:
parent
e59e2aa715
commit
4e1b2451ec
|
@ -112,18 +112,16 @@ class BuildPlan:
|
|||
# See https://stackoverflow.com/a/30736987 for a detailed explanation of why.
|
||||
# Running the script manually from a command prompt is unaffected.
|
||||
subprocess.check_call(["cmd", "/c", f"call {self.script}.bat"],
|
||||
env=os.environ if env is None else env)
|
||||
cwd=build_dir, env=os.environ if env is None else env)
|
||||
else:
|
||||
subprocess.check_call(["sh", f"{self.script}.sh"],
|
||||
env=os.environ if env is None else env)
|
||||
cwd=build_dir, env=os.environ if env is None else env)
|
||||
# TODO(amaranth-0.5): remove
|
||||
if run_script is not None:
|
||||
warnings.warn("The `run_script` argument is deprecated. If you only want to "
|
||||
"extract the files from the BuildPlan, use the .extract() method",
|
||||
DeprecationWarning, stacklevel=2)
|
||||
|
||||
|
||||
|
||||
return LocalBuildProducts(build_dir)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue