cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-6540) Error for creating a project inside its template is confusing
Date Mon, 28 Apr 2014 20:53:14 GMT

    [ https://issues.apache.org/jira/browse/CB-6540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13983524#comment-13983524
] 

ASF GitHub Bot commented on CB-6540:
------------------------------------

GitHub user jsoref opened a pull request:

    https://github.com/apache/cordova-cli/pull/173

    CB-6540 Error for creating a project inside its template is confusing

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/blackberry/cordova-cli cb_6540

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-cli/pull/173.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 #173
    
----
commit 8b0207c30d0f0f7c03ab7428f74b11887f766fce
Author: Josh Soref <jsoref@blackberry.com>
Date:   2014-04-28T20:51:43Z

    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)

Mime
View raw message