Skip to content

Commit

Permalink
Merge pull request #198 from flyingcircusio/phil/run-with-env
Browse files Browse the repository at this point in the history
add env to Run component
  • Loading branch information
zagy authored Nov 15, 2024
2 parents 4d069ff + 9ce35c5 commit 72cef84
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 72cef84

Please sign in to comment.