NSTask launch path not accessible

前端 未结 5 453
谎友^
谎友^ 2020-12-11 16:12

I am using the following code in my Cocoa project to call a script I made. The script is in the same folder as the project and even shows up under the \"Resources\" folder i

5条回答
  •  我在风中等你
    2020-12-11 16:38

    What you will need to do is get the shell binary, and pass your script as an argument. So if the shell script is written targeting bash, get the bash interpreter, and pass it an argument list with one argument: the path to your script.sh.

提交回复
热议问题