Re: shell function: confusing error when shebang incorrect

2022-10-09 Thread Kirill Elagin
On Sun, Oct 9, 2022 at 11:57 AM wrote: > The interpretation of a bad shebang is platform-specific and has no single > consistent interpretation. Some platforms will report EPERM, EACCESS, or > ENOENT. The error is not necessarily under bash or zsh control but could come > from exec[vpe] dependi

shell function: confusing error when shebang incorrect

2022-10-09 Thread Kirill Elagin
Hi, There is a bit of unexpected behaviour in the `shell` function (due to the undocumented fact that it sometimes avoids actually calling the shell): ``` $ cat Makefile FOO:=$(shell ./foo.sh) $ cat foo.sh #!/bin/ohno echo hi $ make make: ./foo.sh: No such file or directory make: *** No targets