- briksoftware Blog - https://briksoftware.com/blog -

zsh-bashing to rescue the NSLog

Doing some tool that uses a NSTask to launch shell-scripts, I ran into a very annoying bug these days. The script were bash scripts and as soon as they were started, all output written by NSLog didn’t go to Xcode’s console, but rather only to console.log. This problem only seems to happen when using bash to execute the scripts, so switching to zsh did the trick and now NSLog works as charming as always. Thanks a lot to Michele for the hint with Zsh, I didn’t know that it uses the same syntax as bash and thus the only changes to the scripts were changes to the first line!

thanks a lot for the folks [1] that found this out!

Karsten