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

nix-shell: don't check for "nix-shell" in shebang script name #3269

merged 1 commit into from Dec 14, 2019


Copy link

@xzfc xzfc commented Dec 14, 2019

Fix bug: if the path to the nix-shell shebang script contains "nix-shell", it won't run properly.

$ cat
#! /usr/bin/env nix-shell
#! nix-shell -p hello -i sh

$ ./
error: undefined variable 'hello' at /tmp/

$ mv

$ ./
Hello, world!

Probably this check was relevant when nix-build was a perl script (as perl handles argv differently than C++).

Copy link

@zimbatm zimbatm commented Dec 14, 2019

this would fix #3153

@edolstra edolstra merged commit 8656a2d into NixOS:master Dec 14, 2019
@xzfc xzfc deleted the xzfc:nix-shell branch Dec 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.