Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Need to remember that std::map::insert() and emplace() don't overwrite
existing entries...
This fixes a regression relative to 1.11 that in particular triggers
in nested nix-shells.
Before:
$ nativeBuildInputs=/foo nix-shell -p hello --run 'hello'
build input /foo does not exist
After:
$ nativeBuildInputs=/foo nix-shell -p hello --run 'hello'
Hello, world!
|
|
In particular, this fixes Ctrl-C in nix-shell sessions.
|
|
|
|
|
|
Regression from a5f2750e ("Fix early removal of rc-file for nix-shell").
The removal of BASH_ENV causes nothing to be executed by bash if it
detects itself in a non-interactive context. Instead, just
use the same condition used by bash to launch bash differently.
According to bash sources, the condition (stdin and stder both
must be TTYs) is specified by POSIX so this should be pretty
safe to rely on.
Fixes #1171 on master, needs a backport to the Perl code in 1.11.
|
|
"i < argc - 1" should be "i < argc".
|
|
I had observed that 'bash --rcfile' would do nothing in a
non-interactive context and cause nothing to be executed if a script
using nix-shell shebangs were run in a non-interactive context.
|
|
The 'args' variable here is shadowing one in the outer scope and its
contents end up unused. This causes any '#! nix-shell' lines to
effectively be ignored. The intention here was to clear the args vector,
as far as I can tell (and it seems to work).
|
|
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There
really is no need for such a massive change...
|
|
|
|
Done slightly differently from https://github.com/NixOS/nix/pull/1093.
|
|
fails
|
|
We were passing "p=$PATH" rather than "p=$PATH;", resulting in some
invalid shell code.
Also, construct a separate environment for the child rather than
overwriting the parent's.
|
|
Otherwise the shell and its children will be bound to one CPU core...
|
|
GCC 4.9 doesn't like reassigning a std::stringstream.
http://hydra.nixos.org/build/40371644
|
|
That's just silly. Hopefully this also fixes the Debian build failure:
http://hydra.nixos.org/build/40371644
|
|
BASH_ENV causes all non-interactive shells called via eg. /etc/bashrc to
remove the rc-file before the main shell gets to run it. Completion
scripts will often do this. Fixes #976.
Adapted from and fixes #1034.
|
|
|
|
An equivalent was originally filed against the perl version:
https://github.com/NixOS/nix/pull/933
|
|
This was a dumb line-for-line rewrite, because nix build/nix run/etc.
will replace it.
|