You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/06/19 00:20:24 UTC
[jira] [Commented] (CB-6540) Error for creating a project inside
its template is confusing
[ https://issues.apache.org/jira/browse/CB-6540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14036530#comment-14036530 ]
ASF GitHub Bot commented on CB-6540:
------------------------------------
GitHub user jsoref opened a pull request:
https://github.com/apache/cordova-lib/pull/35
CB-6540 Error for creating a project inside its template is confusing
From https://github.com/apache/cordova-cli/pull/173
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jsoref/cordova-lib cb_6540
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-lib/pull/35.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #35
----
commit 7a41b67807a7f9ae404a8e8a219affe0a9705422
Author: Josh Soref <js...@blackberry.com>
Date: 2014-06-18T22:17:19Z
CB-6540 Error for creating a project inside its template is confusing
----
> 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)