nix-shell: Fix 'nix-shell -i'

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 commit is contained in:
Tuomas Tynkkynen 2017-01-01 18:42:06 +02:00
parent b6b142b4b1
commit c698ec1f22

View file

@ -117,7 +117,7 @@ int main(int argc, char ** argv)
inShebang = true;
for (int i = 2; i < argc - 1; ++i)
savedArgs.push_back(argv[i]);
std::vector<string> args;
args.clear();
for (auto line : lines) {
line = chomp(line);
std::smatch match;