NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.36k stars 1.49k forks source link

a flag to force shebang mode #801

Open aespinosa opened 8 years ago

aespinosa commented 8 years ago

I've been having trouble to load my default.nix environment for my Jenkins jobs. My script is being interpreted as nix code instead of the interpreter I specified:

[workspace] $ /usr/bin/env nix-shell /var/folders/bh/q33bp93j2js6zv27rds0n1x00000gn/T/hudson5799651993425365822.sh
error: undefined variable ‘jupyter’ at /var/folders/bh/q33bp93j2js6zv27rds0n1x00000gn/T/hudson5799651993425365822.sh:4:1

Here's the Jenkins 'Execute Shell' build step:

#!/usr/bin/env nix-shell
#!nix-shell -i bash

jupyter --version

I would expect to have something like 'jupyter: command not found' if the interpreter being launched was bash.

I think having a flag to force interpretation will be good to remove some ambiguities.

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

stale[bot] commented 2 years ago

I closed this issue due to inactivity. → More info