Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A5C8910969 for ; Fri, 8 Nov 2013 20:22:17 +0000 (UTC) Received: (qmail 96591 invoked by uid 500); 8 Nov 2013 20:22:17 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 96571 invoked by uid 500); 8 Nov 2013 20:22:17 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 96562 invoked by uid 99); 8 Nov 2013 20:22:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Nov 2013 20:22:17 +0000 Date: Fri, 8 Nov 2013 20:22:17 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-4400) can't build from some "www" subdirs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13817647#comment-13817647 ] 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)