cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Koudritsky" <kam...@gmail.com>
Subject Review Request 15253: CB-4400: cd to project root in most cordova commands.
Date Wed, 06 Nov 2013 01:11:56 GMT

-----------------------------------------------------------
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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message