From 0e7da9ef2dca492c62cc4bc100694d1d106fb058 Mon Sep 17 00:00:00 2001 From: Krzysztof Nazarewski Date: Tue, 11 Apr 2023 10:48:55 +0200 Subject: [PATCH] containers: fix run_args for devenv.nix --- src/devenv.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/devenv.nix b/src/devenv.nix index 55d2245b3..7b2890f57 100644 --- a/src/devenv.nix +++ b/src/devenv.nix @@ -148,11 +148,13 @@ pkgs.writeScriptBin "devenv" '' if [[ ''${subcommand[--docker-run]} != false ]]; then # shellcheck disable=SC1090 source "$(command -v docopts.sh)" - $($CUSTOM_NIX/bin/nix $NIX_FLAGS build --print-out-paths --no-link --impure ".#devenv.containers.\"$container\".dockerRun") -- $(docopt_get_values subcommand '') - if [[ ''${subcommand[--podman-run]} != false ]]; then + eval "$(docopt_get_eval_array args '' run_args)" + $($CUSTOM_NIX/bin/nix $NIX_FLAGS build --print-out-paths --no-link --impure ".#devenv.containers.\"$container\".dockerRun") -- "''${run_args[@]}" + elif [[ ''${subcommand[--podman-run]} != false ]]; then # shellcheck disable=SC1090 source "$(command -v docopts.sh)" - $($CUSTOM_NIX/bin/nix $NIX_FLAGS build --print-out-paths --no-link --impure ".#devenv.containers.\"$container\".podmanRun") -- $(docopt_get_values subcommand '') + eval "$(docopt_get_eval_array args '' run_args)" + $($CUSTOM_NIX/bin/nix $NIX_FLAGS build --print-out-paths --no-link --impure ".#devenv.containers.\"$container\".podmanRun") -- "''${run_args[@]}" fi ;; search)