objective c - NSTask not picking up $PATH from the user's environment - Stack Overflow
なんか$PATHがちゃんと読まれないことが・・・。
/bin/bach -lc
すれば~/.bash_profile
は読まれるようになるが、その中でsource ~/.bashrc
している場合にこれがうまく読まれないことがある。それは、シェルスクリプトでbashrcが読み込めないにあるようにUbuntuなりで使っていたものをそのまま持ってきて流用している場合に起こることがある。自分の場合では
# If not running interactively, don't do anything [ -z "$PS1" ] && return
が入っていた。数日を費やした・・・
bash - Why does bashrc check whether the current shell is interactive? - Unix & Linux Stack Exchangeも関連する。