diff options
author | Bernardo Meurer <bernardo@meurer.org> | 2021-10-04 12:43:39 -0700 |
---|---|---|
committer | Bernardo Meurer <bernardo@meurer.org> | 2021-10-04 12:43:39 -0700 |
commit | c301c1995e118c86308ed61359e45c96a741fac9 (patch) | |
tree | 4cf2bbe13100afd4d71cac1329bd68b2e43498e9 /nixos/modules | |
parent | 0699530f08290f34c532beedd66046825d9756fa (diff) | |
download | nixlib-c301c1995e118c86308ed61359e45c96a741fac9.tar nixlib-c301c1995e118c86308ed61359e45c96a741fac9.tar.gz nixlib-c301c1995e118c86308ed61359e45c96a741fac9.tar.bz2 nixlib-c301c1995e118c86308ed61359e45c96a741fac9.tar.lz nixlib-c301c1995e118c86308ed61359e45c96a741fac9.tar.xz nixlib-c301c1995e118c86308ed61359e45c96a741fac9.tar.zst nixlib-c301c1995e118c86308ed61359e45c96a741fac9.zip |
command-not-found: remove NIX_AUTO_INSTALL
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/programs/command-not-found/command-not-found.pl | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/nixos/modules/programs/command-not-found/command-not-found.pl b/nixos/modules/programs/command-not-found/command-not-found.pl index 6e275bcc8be6..220d057b7f4f 100644 --- a/nixos/modules/programs/command-not-found/command-not-found.pl +++ b/nixos/modules/programs/command-not-found/command-not-found.pl @@ -25,14 +25,7 @@ if (!defined $res || scalar @$res == 0) { print STDERR "$program: command not found\n"; } elsif (scalar @$res == 1) { my $package = @$res[0]->{package}; - if ($ENV{"NIX_AUTO_INSTALL"} // "") { - print STDERR <<EOF; -The program '$program' is currently not installed. It is provided by -the package '$package', which I will now install for you. -EOF - ; - exit 126 if system("nix-env", "-iA", "nixos.$package") == 0; - } elsif ($ENV{"NIX_AUTO_RUN"} // "") { + if ($ENV{"NIX_AUTO_RUN"} // "") { exec("nix-shell", "-p", $package, "--run", shell_quote("exec", @ARGV)); } else { print STDERR <<EOF; |