DavHau/nix-portable

Spaces in paths not escaped. — **Does `rm -rf` on arbitrary paths**, I think?

will-ca opened this issue · 1 comments

$ echo "$NP_LOCATION"
/home/User/Files/Subdirectory With Spaces In Name/MoreFiles/Project
$ ./nix-portable nix-shell ./shell.nix
./nix-portable: line 42: test: /home/User/Files/Subdirectory
/home/User/Files/Subdirectory With Spaces In Name/MoreFiles/Project/.nix-portable/busybox/bin/busybox: No such file or directory

nix-portable/default.nix

Lines 373 to 374 in ce30382

mkdir -p \$dir/tmp \$dir/store/
rm -rf \$dir/tmp/*

nix-portable/default.nix

Lines 380 to 381 in ce30382

)
rm -rf \$dir/tmp

…Well. That's scary.

Let's not go through this again, shall we?