Skip to content

Commit eeecf8f

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

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

flake.nix

Lines changed: 5 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,10 @@
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+
echo $0
28+
exec "''${__TMPX_DAT_PATH}/${nixpkgs'.bash}/bin/bash" <<-EOH
29+
''${__TMPX_DAT_PATH}$(dirname ${program})/$(basename $0) $@
30+
EOH
2831
'';
2932
script = if nixpkgs'.stdenv.isDarwin then script-darwin else script-linux;
3033
in nix-bundle.makebootstrap {

0 commit comments

Comments
 (0)