Skip to content

Commit 48687ec

Browse files
Framework fix of BashScriptCommand
do not use interpolate for load_script. The only way variables can be passed to scripts is through command line arguments.
1 parent ce5ca30 commit 48687ec

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

  • configuration/steps/commands

configuration/steps/commands/base.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,22 @@ def as_cmd_arg(self) -> list[str]:
4040

4141
class BashScriptCommand(Command):
4242
def __init__(
43-
self, script_name: str, args: list[str] = None, user: str = "buildbot"
43+
self,
44+
script_name: str,
45+
args: list[str] = None,
46+
user: str = "buildbot",
47+
workdir: PurePath = PurePath("."),
4448
):
4549
name = f"Run {script_name}"
46-
super().__init__(name=name, workdir=PurePath("."), user=user)
50+
super().__init__(name=name, workdir=workdir, user=user)
4751
self.script_name = script_name
4852
self.args = args if args is not None else []
4953

5054
def as_cmd_arg(self) -> list[str]:
5155
return [
5256
"bash",
5357
"-exc",
54-
util.Interpolate(load_script(script_name=self.script_name)),
58+
load_script(script_name=self.script_name),
5559
"--",
5660
*self.args,
5761
]

0 commit comments

Comments
 (0)