Skip to content

Commit

Permalink
add env to Run component
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilTaken committed Nov 7, 2024
1 parent 339c2f1 commit 9ce35c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.d/20241107_141439_ph_run_with_env.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- add an env argument for the `Run` component to support running commands with specific environment variables
3 changes: 2 additions & 1 deletion src/batou_ext/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class Run(batou.component.Component):
namevar = "command"
content = None
file = None
env = None

def configure(self):

Expand All @@ -55,5 +56,5 @@ def verify(self):

def update(self):
self.touch(self.command_file.path)
self.cmd(self.command_file.path)
self.cmd(self.command_file.path, env=self.env)
self.touch(f"{self.command_file.path}_stamp")

0 comments on commit 9ce35c5

Please sign in to comment.