Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
will-ca opened this issue Jan 27, 2023 · 1 comment · May be fixed by #46
Open

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

will-ca opened this issue Jan 27, 2023 · 1 comment · May be fixed by #46

Comments

@will-ca
Copy link

will-ca commented Jan 27, 2023

$ 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
Copy link
Author

will-ca commented Jan 27, 2023

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?

@will-ca will-ca changed the title Spaces in paths not escaped. Spaces in paths not escaped. — **Does rm -rf on arbitrary paths**, I think? Jan 27, 2023
@will-ca will-ca linked a pull request Jan 27, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant