Skip to content

Commit 71db641

Browse files
author
Cassandra Comar
committed
fix: multi-argument commands
1 parent 6100bf4 commit 71db641

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

flake.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
nix-bundle = import self { nixpkgs = nixpkgs'; inherit fakedir; };
1313
script-linux = nixpkgs'.writeScript "startup" ''
1414
#!/usr/bin/env bash
15-
exec .${nix-bundle.nix-user-chroot}/bin/nix-user-chroot -n ./nix -w "''${TMPX_RESTORE_PWD}" -- "$(dirname ${program})/$(basename "$0")" "$@"
15+
exec .${nix-bundle.nix-user-chroot}/bin/nix-user-chroot -n ./nix -w "''${TMPX_RESTORE_PWD}" -- "$(dirname ${program})/$(basename $0)" "$@"
1616
'';
1717
script-darwin = nixpkgs'.writeScript "startup" ''
1818
#!/usr/bin/env bash
@@ -24,7 +24,9 @@
2424
export FAKEDIR_TARGET="''${__TMPX_DAT_PATH}/nix"
2525
2626
# make sure the fakedir libraries are loaded by running the command in bash within the bottle
27-
exec "''${__TMPX_DAT_PATH}/${nixpkgs'.bash}/bin/bash" -c "exec ''${__TMPX_DAT_PATH}$(dirname ${program})/$(basename "$0") $@"
27+
exec "''${__TMPX_DAT_PATH}/${nixpkgs'.bash}/bin/bash" <<-EOH
28+
''${__TMPX_DAT_PATH}$(dirname ${program})/$(basename $0) $@
29+
EOH
2830
'';
2931
script = if nixpkgs'.stdenv.isDarwin then script-darwin else script-linux;
3032
in nix-bundle.makebootstrap {

0 commit comments

Comments
 (0)