Skip to content

Commit

Permalink
update to 0.0.116
Browse files Browse the repository at this point in the history
  • Loading branch information
goFrendiAsgard committed Nov 28, 2023
1 parent 120d7bd commit d3e38e8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"

[project]
name = "zrb"
version = "0.0.115"
version = "0.0.116"
authors = [
{ name="Go Frendi Gunawan", email="gofrendiasgard@gmail.com" },
]
Expand Down
16 changes: 11 additions & 5 deletions src/zrb/task/cmd_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,17 @@ def print_result(self, result: CmdResult):
def inject_envs(self):
super().inject_envs()
input_map = self.get_input_map()
for input_name, input_value in input_map.items():
env_name = '_INPUT_' + input_name.upper()
self.add_env(
Env(name=env_name, os_name='', default=str(input_value))
)
for task_input in self._get_combined_inputs():
input_key = self._get_normalized_input_key(task_input.get_name())
input_value = input_map.get(input_key)
env_name = '_INPUT_' + input_key.upper()
should_render = task_input.should_render()
self.add_env(Env(
name=env_name,
os_name='',
default=str(input_value),
should_render=should_render
))

async def run(self, *args: Any, **kwargs: Any) -> CmdResult:
cmd = self.get_cmd_script(*args, **kwargs)
Expand Down

0 comments on commit d3e38e8

Please sign in to comment.