I am using the solution described in here to call a command line tool from within my Swift app, but always receive an error for the file I am giving as an argument. If I just copy the complete call string to Terminal, it runs just fine.
My first thought was that it might has to do with the spaces in the file path, but that does not matter. Since the response comes from the tool itself, not from shell, the call seems to be OK in general. The path that I am using as an argument comes from a file dragged into the app from the finder.
Call from Swift:
self.shell("/Applications/AtomicParsley","'\(FileURLLabel.stringValue)'","--artwork REMOVE_ALL --overWrite")
Response in console:
AP error trying to fopen '/Users/Tom/Downloads/Test file.m4v': No such file or directory
AtomicParsley error: can't open '/Users/Tom/Downloads/Test file.m4v' for reading: No such file or directory