Skip to content

Commit

Permalink
containers: fix run_args for devenv.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
nazarewk committed Apr 11, 2023
1 parent b640f70 commit 0e7da9e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<run-args>')
if [[ ''${subcommand[--podman-run]} != false ]]; then
eval "$(docopt_get_eval_array args '<run-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 '<run-args>')
eval "$(docopt_get_eval_array args '<run-args>' run_args)"
$($CUSTOM_NIX/bin/nix $NIX_FLAGS build --print-out-paths --no-link --impure ".#devenv.containers.\"$container\".podmanRun") -- "''${run_args[@]}"
fi
;;
search)
Expand Down

0 comments on commit 0e7da9e

Please sign in to comment.