cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-4400) can't build from some "www" subdirs
Date Fri, 08 Nov 2013 20:22:17 GMT

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

ASF subversion and git services commented on CB-4400:
-----------------------------------------------------

Commit 78d9699bc714a97941564fe811ec5b7879e34e0d in branch refs/heads/master from [~kamrik]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-cli.git;h=78d9699 ]

CB-4400: cd to project root in most cordova commands.

cd to project root dir as the first thing for most cordova commands by
calling a new func util.cdProjectRoot().

This function throws and exception if process.cwd() is not in a Cordova
project. In terms of interaction with the Q promises this exception
behaves the same way as those thrown e.g. by fs.readFileSync().

This change does not entirely solve the problem of running prepare while
in platforms/.../www/ dir (that is deleted during prepare). The
operation will now succeed, but the user's shell will stay in a bad
state with detached inode as the CWD.

The patch file has two separate commits in it (looks like it's not
visible here on the "View Diff" pane but will affect "git am"). One for
the main part and the second for tests.

Same diff on Github:
https://github.com/kamrik/cordova-cli/compare/CB-4400_chdir_root


> can't build from some "www" subdirs
> -----------------------------------
>
>                 Key: CB-4400
>                 URL: https://issues.apache.org/jira/browse/CB-4400
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 3.0.0
>         Environment: Mac
>            Reporter: Mike Sierra
>            Assignee: Mark Koudritsky
>            Priority: Minor
>
> With various platforms installed, run "cordova build" from platforms/ios/www. Fails,
but OK to run cmd from elsewhere. Output:
> Ulothrix:ios sierra$ pwd
> /Users/sierra/sandbox/pg/hello/platforms/ios
> Ulothrix:ios sierra$ cd www
> Ulothrix:www sierra$ cordova platforms
> [ 'android', 'blackberry10', 'ios' ]
> Ulothrix:www sierra$ cordova build
> [Error: An error occurred while building the blackberry10 project. shell-init: error
retrieving current directory: getcwd: cannot access parent directories: No such file or directory
> shell-init: error retrieving current directory: getcwd: cannot access parent directories:
No such file or directory
> node.js:810
>     var cwd = process.cwd();
>                       ^
> Error: ENOENT, no such file or directory
>     at Function.startup.resolveArgv0 (node.js:810:23)
>     at startup (node.js:58:13)
>     at node.js:901:3
> ]
> Ulothrix:www sierra$ cd ..
> Ulothrix:ios sierra$ cordova build
> Ulothrix:ios sierra$ 



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message