`which` fails on macOS
Joannis opened this issue · 0 comments
Joannis commented
Describe the bug
The command which
fails to resolve any application, on the macOS 13 beta.
To Reproduce
Using Swift 5.7 on macOS 13, run the Process.shell.which("cat")
command, or any other application that which
is able to find in the shell. There's no error, but just an empty string for output. This happens while running it from Xcode itself, so doesn't affect most use cases.
Expected behavior
which
returns the path to the requested command line utility.
Additional context
Adding -l
(login shell) on macOS builds fixes the problem, but I'm not sure if this affects specific platforms.