https://dagster.io/ logo
#ask-community
Title
# ask-community
n

Noah Newton

06/15/2023, 3:04 PM
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

owen

06/15/2023, 5:06 PM
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

Noah Newton

06/15/2023, 5:21 PM
Would there be any way to make <env> and argument if I did this?
o

owen

06/15/2023, 5:23 PM
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
3 Views