Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 24DAC10A86 for ; Thu, 7 Nov 2013 21:38:29 +0000 (UTC) Received: (qmail 22860 invoked by uid 500); 7 Nov 2013 21:38:28 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 22835 invoked by uid 500); 7 Nov 2013 21:38:28 -0000 Mailing-List: contact dev-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 dev@cordova.apache.org Received: (qmail 22825 invoked by uid 99); 7 Nov 2013 21:38:28 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Nov 2013 21:38:28 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id B0FBF1D3952; Thu, 7 Nov 2013 21:38:25 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============9222828333977764418==" MIME-Version: 1.0 Subject: Re: Review Request 15253: CB-4400: cd to project root in most cordova commands. From: "Braden Shepherdson" To: "Mark Koudritsky" , "Braden Shepherdson" , "cordova" Date: Thu, 07 Nov 2013 21:38:25 -0000 Message-ID: <20131107213825.30021.9575@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Braden Shepherdson" X-ReviewGroup: cordova X-ReviewRequest-URL: https://reviews.apache.org/r/15253/ X-Sender: "Braden Shepherdson" References: <20131106011156.30021.59404@reviews.apache.org> In-Reply-To: <20131106011156.30021.59404@reviews.apache.org> Reply-To: "Braden Shepherdson" --===============9222828333977764418== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/15253/#review28451 ----------------------------------------------------------- Ship it! Ship It! - Braden Shepherdson On Nov. 6, 2013, 1:11 a.m., Mark Koudritsky wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/15253/ > ----------------------------------------------------------- > > (Updated Nov. 6, 2013, 1:11 a.m.) > > > Review request for cordova. > > > Bugs: CB-4400 > https://issues.apache.org/jira/browse/CB-4400 > > > Repository: cordova-cli > > > Description > ------- > > 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 > > > Diffs > ----- > > spec/build.spec.js 6e30825 > spec/compile.spec.js 5b4682a > spec/emulate.spec.js ddc5a21 > spec/info.spec.js e281829 > spec/platform.spec.js e6925a2 > spec/plugin.spec.js 1f4bf97 > spec/prepare.spec.js 8012924 > spec/run.spec.js 8fc833f > src/build.js 440817c > src/compile.js a9a31e8 > src/emulate.js cf5e7b9 > src/info.js b64c58e > src/platform.js 65c533c > src/plugin.js 0139393 > src/prepare.js 4ea22c5 > src/run.js 13dcb11 > src/serve.js 01335ef > src/util.js 07189df > > Diff: https://reviews.apache.org/r/15253/diff/ > > > Testing > ------- > > cordova create TstApp > cd TstApp > crodova platform add adnroid > cordova prepare > cordova build > > npm test (1 test failure, same as on master - confgi_parser.spec.js) > > > Thanks, > > Mark Koudritsky > > --===============9222828333977764418==--