nix-portable icon indicating copy to clipboard operation
nix-portable copied to clipboard

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

Open will-ca opened this issue 2 years ago • 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

will-ca avatar Jan 27 '23 13:01 will-ca

https://github.com/DavHau/nix-portable/blob/ce30382f48a42b13179f5b23a85b1e81b46ed5e7/default.nix#L373-L374

https://github.com/DavHau/nix-portable/blob/ce30382f48a42b13179f5b23a85b1e81b46ed5e7/default.nix#L380-L381

…Well. That's scary.

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

will-ca avatar Jan 27 '23 14:01 will-ca