1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Run command-not-found in sh only if errno is ENOENT.

This commit is contained in:
Jonas 'Sortie' Termansen 2014-03-17 20:09:36 +01:00
parent 2697711dc1
commit d7e1c926a2

View file

@ -344,7 +344,7 @@ readcmd:
}
execvp(argv[0], argv);
if ( interactive )
if ( interactive && errno == ENOENT )
{
int errno_saved = errno;
execlp("command-not-found", "command-not-found", argv[0], NULL);