Hello! I am trying to use dagster_shell.create_she...
# ask-community
n
Hello! I am trying to use dagster_shell.create_shell_script_op to run a script in my directory, but I would like it to run with some additional arguments (scriptname.sh -e <env>). I am not exactly sure how to do this. I see that create_shell_script_op has an ins parameter, but I am not sure how that is used or if that will help me. How should I add the arguments to my running shell script?
o
hi @Noah Newton! the shell_script_op does not apply any arguments to the script (from the ins or otherwise). one option would be to instead use
create_shell_command_op
, and pass in
bash scriptname.sh -e <env>
as the command to execute
n
Would there be any way to make <env> and argument if I did this?
o
ah as in something that might change based on runtime conditions?
if you want full flexibility, it might be best to write your own op which just invokes the same
execute
command that the built-in op does: https://sourcegraph.com/github.com/dagster-io/dagster/-/blob/python_modules/libraries/dagster-shell/dagster_shell/ops.py?L119