File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ Options:
32
32
--podman-run Execute `podman run`.
33
33
' : " $@ " ) "
34
34
35
+ local run_args=()
36
+ eval " $( docopt_get_eval_array args ' <run-args>' run_args) "
37
+
35
38
local registry=" ${args['--registry']} "
36
39
local copy_args=()
37
40
@@ -50,13 +53,10 @@ Options:
50
53
# shellcheck disable=SC2086
51
54
nix run " ${app_prefix} -copy-to" -- --registry " ${registry} " " ${copy_args[@]} " ${args['--copy-args']}
52
55
fi
53
- eval " $( docopt_get_eval_array args ' <run-args>' run_args) "
54
56
55
57
if [[ " ${args['--docker-run']} " != false ]]; then
56
- # shellcheck disable=SC2154
57
58
nix run " ${app_prefix} -docker-run" -- " ${run_args[@]} "
58
59
elif [[ " ${args['--podman-run']} " != false ]]; then
59
- # shellcheck disable=SC2154
60
60
nix run " ${app_prefix} -podman-run" -- " ${run_args[@]} "
61
61
fi
62
62
}
Original file line number Diff line number Diff line change @@ -116,7 +116,11 @@ pkgs.writeScriptBin "devenv" ''
116
116
EOF
117
117
)
118
118
119
+ # shellcheck disable=SC1090
120
+ source "$(command -v docopts.sh)"
119
121
eval "$(${ pkgs . docopts } /bin/docopts -A subcommand -h "$help" : "$@")"
122
+ local run_args=()
123
+ eval "$(docopt_get_eval_array args '<run-args>' run_args)"
120
124
121
125
export DEVENV_CONTAINER=1
122
126
container="'' ${subcommand[CONTAINER-NAME]}"
@@ -146,13 +150,9 @@ pkgs.writeScriptBin "devenv" ''
146
150
fi
147
151
148
152
if [[ '' ${subcommand[--docker-run]} != false ]]; then
149
- # shellcheck disable=SC1090
150
- source "$(command -v docopts.sh)"
151
- $($CUSTOM_NIX/bin/nix $NIX_FLAGS build --print-out-paths --no-link --impure ".#devenv.containers.\"$container\".dockerRun") -- $(docopt_get_values subcommand '<run-args>')
152
- if [[ '' ${subcommand[--podman-run]} != false ]]; then
153
- # shellcheck disable=SC1090
154
- source "$(command -v docopts.sh)"
155
- $($CUSTOM_NIX/bin/nix $NIX_FLAGS build --print-out-paths --no-link --impure ".#devenv.containers.\"$container\".podmanRun") -- $(docopt_get_values subcommand '<run-args>')
153
+ $($CUSTOM_NIX/bin/nix $NIX_FLAGS build --print-out-paths --no-link --impure ".#devenv.containers.\"$container\".dockerRun") -- "'' ${run_args[@]}"
154
+ elif [[ '' ${subcommand[--podman-run]} != false ]]; then
155
+ $($CUSTOM_NIX/bin/nix $NIX_FLAGS build --print-out-paths --no-link --impure ".#devenv.containers.\"$container\".podmanRun") -- "'' ${run_args[@]}"
156
156
fi
157
157
;;
158
158
search)
You can’t perform that action at this time.
0 commit comments