about summary refs log tree commit diff
path: root/scripts/nix-generate-patches.in
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2013-10-17T15·07-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-18T12·34+0200
commit4ea034a5c56a60ae0ceedf18a066c428a963c836 (patch)
tree938709e8fc741cc0b494df7b1dd870f41d78a819 /scripts/nix-generate-patches.in
parent792fd51f41212b0bf1d8a121a4f228a92fec3906 (diff)
nix-shell: Play nicely with non-interactive shells
nix-shell with the --command flag might be used non-interactively, but
if bash starts non-interactively (i.e. with stdin or stderr not a
terminal), it won't source the script given in --rcfile. However, in
that case it *will* source the script found in $BASH_ENV, so we can use
that instead.

Also, don't source ~/.bashrc in a non-interactive shell (detectable by
checking the PS1 env var)

Signed-off-by: Shea Levy <shea@shealevy.com>
Diffstat (limited to 'scripts/nix-generate-patches.in')
0 files changed, 0 insertions, 0 deletions