@@ -28,6 +28,17 @@ if ($len == 0) {
2828} elsif ($len == 1) {
2929 my $package = @$res[0]->{package};
3030 if ($ENV{"NIX_AUTO_RUN"} // "") {
31+ if ($ENV{"NIX_AUTO_RUN_INTERACTIVE"} // "") {
32+ while (1) {
33+ print STDERR "'$program' from package '$package' will be run, confirm? [yn]: ";
34+ chomp(my $comfirm = <STDIN>);
35+ if (lc $comfirm eq "n") {
36+ exit 0;
37+ } elsif (lc $comfirm eq "y") {
38+ last;
39+ }
40+ }
41+ }
3142 exec("nix-shell", "-p", $package, "--run", shell_quote("exec", @ARGV));
3243 } else {
3344 print STDERR <<EOF;