mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 23:24:39 +00:00
Give special error for when file failed to execute but is executable
This is after we've tried to find the interpreter, so we would already have complained about e.g. /usr/bin/pthyon not existing. Realistically the most common case here is things that don't start with a shebang like ELFs. Writing special extraction code here is overkill, and I can't see a good function to do it for us. But this should point you in the right direction. Fixes #8938
This commit is contained in:
parent
e3c6cbaaa6
commit
770a2582de
1 changed files with 4 additions and 0 deletions
|
@ -469,6 +469,10 @@ void safe_report_exec_error(int err, const char *actual_cmd, const char *const *
|
|||
"executable command.",
|
||||
actual_cmd, interpreter);
|
||||
}
|
||||
} else if (access(actual_cmd, X_OK) == 0) {
|
||||
FLOGF_SAFE(exec,
|
||||
"Failed to execute process '%s': The file exists and is executable. Check the interpreter or linker?",
|
||||
actual_cmd);
|
||||
} else {
|
||||
FLOGF_SAFE(exec,
|
||||
"Failed to execute process '%s': The file does not exist or could not "
|
||||
|
|
Loading…
Reference in a new issue