> On Nov 27, 2013, at 7:59 AM, koko <k...@highrolls.net> wrote:

> 
> NSString *scriptPath = [[NSBundle mainBundle] pathForResource:@"DeleteHidden" 
> ofType:nil];
> 
> NSTask *task;
> task = [[NSTask alloc] init];
> [task setLaunchPath:scriptPath];
> 
> The script DeleteHidden had line endings of <cf,lf> which caused an exception 
> on 10.9
> removing the <cr> via a hex editor resolved the 10.9 issue

Ha! Indeed, I can reproduce this on my machine using Terminal.app:
 
% cat foo
#!/bin/sh

echo Hello, world

% ./foo
zsh: ./foo: bad interpreter: /bin/sh^M: no such file or directory


So technically posix_spawn wasn't lying—when it parsed your shebang
line, it saw `#!/bin/sh<CR>`, and couldn’t find a shell named `sh<CR>`
to launch it.

--Kyle Sluder

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to