-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15253/
-----------------------------------------------------------

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

Reply via email to