Josh Soref created CB-6540: ------------------------------ Summary: Error for creating a project inside its template is confusing Key: CB-6540 URL: https://issues.apache.org/jira/browse/CB-6540 Project: Apache Cordova Issue Type: Bug Components: CLI Affects Versions: 3.4.0 Reporter: Josh Soref Assignee: Josh Soref
If you pass the right magic template to cli.create: {quote} options = \{ id: id, name: name, lib: \{} }; options.lib.www = \{id: 'custom', version: '0', uri: path.resolve(template)}} cordova.create(dir, null, null, options, function (err) {}); {quote} You end up reaching this code path: {quote} if ( www_dir.indexOf(path.resolve(config_json.lib.www.uri)) === 0 ) \{ throw new CordovaError( 'Project must not be created inside the www assets dir.' + '\n project dir:\t' + dir + '\n www assets dir:\t' + config_json.lib.www.uri ); } {quote} The output is: {quote} \{ name: 'CordovaError', message: 'Project must not be created inside the www assets dir.\n project dir:\t/private/tmp/null/y\n www assets dir:\t/private/tmp/null' } {quote} Amongst the many problems: 1. The \n's and \t's aren't actually being converted into newlines and tabs 2. The message is absolutely incomprehensible (even if it wasn't garbled up by the encoded whitespace). -- This message was sent by Atlassian JIRA (v6.2#6252)