Merge pull request #3131 from matthewbauer/dont-source-bashrc-in-pure-mode

Don’t source bashrc in pure mode
This commit is contained in:
Eelco Dolstra 2019-10-09 09:25:44 +02:00 committed by GitHub
commit 6b3a6fe5a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -412,7 +412,7 @@ static void _main(int argc, char * * argv)
auto rcfile = (Path) tmpDir + "/rc";
writeFile(rcfile, fmt(
(keepTmp ? "" : "rm -rf '%1%'; "s) +
"[ -n \"$PS1\" ] && [ -e ~/.bashrc ] && source ~/.bashrc; "
(pure ? "" : "[ -n \"$PS1\" ] && [ -e ~/.bashrc ] && source ~/.bashrc;")
"%2%"
"dontAddDisableDepTrack=1; "
"[ -e $stdenv/setup ] && source $stdenv/setup; "