apache/cordova-ios — pull request #63 by rtimothy (2013-06-29 19:25:50+00:00)
Title: Specifying a directory that does not exist floods the console with errors, instead print a nice message

Currently run the create command and specify a dir that doesn't exist and you get this:

$ ./create /tmp/dir/that/does/not/exist com.rtimothy FooProject
cp: /tmp/dir/that/does/not/exist: No such file or directory
cp: /Users/trobertson/my_gits/cordova-ios/bin/templates/project/: unable to copy extended attributes to /tmp/dir/that/does/not/exist: No such file or directory
cp: /tmp/dir/that/does/not/exist/__TESTING__: No such file or directory
cp: /Users/trobertson/my_gits/cordova-ios/bin/templates/project//__TESTING__: unable to copy extended attributes to /tmp/dir/that/does/not/exist/__TESTING__: No such file or directory
... About 50 more lines of this....
cp: /tmp/dir/that/does/not/exist/www/spec/lib/jasmine-1.2.0/jasmine.js: No such file or directory
cp: /tmp/dir/that/does/not/exist/www/spec/lib/jasmine-1.2.0/MIT.LICENSE: No such file or directory
cp: /tmp/dir/that/does/not/exist/www/spec.html: No such file or directory

With my fix you get this:
$ ./create /tmp/dir/that/does/not/exist com.rtimothy FooProject
Error: /tmp/dir/that/does/not/exist does not exist. Please specify an empty folder.