productbuild command throws exception if given invalid output path

Originator:jeremy.knope
Number:rdar://11263746 Date Originated:17-Apr-2012 03:05 PM
Status:open Resolved:
Product:Developer Tools Product Version:4.3.2/4E2002
Classification:Other Bug Reproducible:Always
 
Summary:
When using the command line tool 'productbuild' to build a app store installer package, the tool fails to properly check the output path given and tell the user the path is invalid/doesn't exist.

Steps to Reproduce:

1. Run productbuild with an output path containing a non-existent directory, like "test/Test.pkg"

Expected Results:
productbuild reports that "test/Test.pkg" is an invalid path, or that "test" doesn't exist.

Actual Results:

productbuild: Adding component at /Ambrosia/Trunk/sources/TestApp/build/Beta/TestApp.app
2012-04-17 11:00:03.715 productbuild[70089:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary setObject:forKey:]: attempt to insert nil key'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff8e861fc6 __exceptionPreprocess + 198
	1   libobjc.A.dylib                     0x00007fff89d0ed5e objc_exception_throw + 43
	2   CoreFoundation                      0x00007fff8e861dfa +[NSException raise:format:arguments:] + 106
	3   CoreFoundation                      0x00007fff8e861d84 +[NSException raise:format:] + 116
	4   CoreFoundation                      0x00007fff8e81eefc -[__NSCFDictionary setObject:forKey:] + 156
	5   productbuild                        0x0000000103684205 productbuild + 8709
	6   productbuild                        0x0000000103683368 productbuild + 4968
)
terminate called throwing an exception[1]    70089 abort      productbuild --component TestApp.app /Applications --sign  blargh/test.pkg

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!