[
https://issues.apache.org/jira/browse/CB-6540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14036571#comment-14036571
]
ASF subversion and git services commented on CB-6540:
-----------------------------------------------------
Commit f7f92e83154d5ae06fb692f2821893a84bc7f595 in cordova-lib's branch
refs/heads/master from [~jsoref]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;h=f7f92e8 ]
CB-6540 Rephrase Error msg for creating a project inside its template
github: close #35
> 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)