cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Soref (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CB-6540) Error for creating a project inside its template is confusing
Date Thu, 26 Jun 2014 21:47:26 GMT

     [ https://issues.apache.org/jira/browse/CB-6540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Josh Soref resolved CB-6540.
----------------------------

       Resolution: Fixed
    Fix Version/s: 3.6.0

> 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
>             Fix For: 3.6.0
>
>
> 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