about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamuel Dionne-Riel <samuel@dionne-riel.com>2018-08-01T22·30-0400
committerSamuel Dionne-Riel <samuel@dionne-riel.com>2018-08-01T22·30-0400
commitfb6907e3d68f1373917b8c46f4cd1abb341f4bbd (patch)
treebad3728c4f19b4b04289e01d3f1c4dcec0941b84
parentb27431b7cb918e6866f4bb4fa7ec6e23240cfeab (diff)
Removes unused variable from `nix-build/nix-shell`
This particular `shell` variable wasn't used, since a new one was
declared in the only side of the `if` branch that used a `shell`
variable.

It could realistically confuse developers thinking it could use `$SHELL`
under some situations.
-rwxr-xr-xsrc/nix-build/nix-build.cc1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc
index de0e9118fd21..35ad98731538 100755
--- a/src/nix-build/nix-build.cc
+++ b/src/nix-build/nix-build.cc
@@ -85,7 +85,6 @@ void mainWrapped(int argc, char * * argv)
     BuildMode buildMode = bmNormal;
     bool readStdin = false;
 
-    auto shell = getEnv("SHELL", "/bin/sh");
     std::string envCommand; // interactive shell
     Strings envExclude;