mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 10:11:10 +08:00

If you make a script called `foo` somewhere in $PATH, and did not give it a shebang, this would end up calling sh foo instead of sh /usr/bin/foo which might not match up. Especially if the path is e.g. `--version` or `-` that would end up being misinterpreted *by sh*. So instead we simply pass the actual_cmd to sh, because we need it anyway to get it to fail to execute before.