git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #140519 from lovesegfault/no-auto-install

command-not-found: remove NIX_AUTO_INSTALL

commitf18bf9b9f10b0e3f40717971ba327c6a4ee6f18a authorEelco Dolstra <edolstra@gmail.com> dateTue 5 Oct 2021, 11:15 (5 years ago) parent8377a7bc301c19
1 file changed+1−8
nixos/modules/programs/command-not-found/command-not-found.pl+1−8
nixos/modules/programs/command-not-found/command-not-found.pl+1−8
@@ -25,14 +25,7 @@ if (!defined $res || scalar @$res == 0) {
2525 print STDERR "$program: command not found\n";
2626} elsif (scalar @$res == 1) {
2727 my $package = @$res[0]->{package};
28− if ($ENV{"NIX_AUTO_INSTALL"} // "") {
29− print STDERR <<EOF;
30−The program '$program' is currently not installed. It is provided by
31−the package '$package', which I will now install for you.
32−EOF
33− ;
34− exit 126 if system("nix-env", "-iA", "nixos.$package") == 0;
35− } elsif ($ENV{"NIX_AUTO_RUN"} // "") {
28+ if ($ENV{"NIX_AUTO_RUN"} // "") {
3629 exec("nix-shell", "-p", $package, "--run", shell_quote("exec", @ARGV));
3730 } else {
3831 print STDERR <<EOF;