You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Mark Koudritsky <ka...@gmail.com> on 2013/10/04 23:18:20 UTC

Review Request 14495: CB-4748 Fail quickly if dir passed to cordova create is not empty.

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

Review request for cordova.


Bugs: CB-4748
    https://issues.apache.org/jira/browse/CB-4748


Repository: cordova-cli


Description
-------

CB-4748 Fail quickly if dir passed to cordova create is not empty.


Diffs
-----

  src/create.js 4b2b9506c16ab5adc04f88f3c8d53766266df5c6 

Diff: https://reviews.apache.org/r/14495/diff/


Testing
-------

ran twice:
cordova create .
and
cordova create some_dir 


Thanks,

Mark Koudritsky


Re: Review Request 14495: CB-4748 Fail quickly if dir passed to cordova create is not empty.

Posted by Andrew Grieve <ag...@chromium.org>.

> On Oct. 4, 2013, 10:01 p.m., Michal Mocny wrote:
> > We leverage pre-creating a cordova directory in order to pre-create a .cordova/config.json.   I haven't confirmed, but this seem unlikely to work with this patch.   Phonegap-cli also uses this trick.
> > 
> > Likely this patch can land once we can add the ability to set the default config file contents (such as www dir).

Good point. I think a good way to fix this would be to change src/config.js to not write the config file right away. Instead, it should wait to write it until project create.

So - in config.js, delete the call to write() from config(), and it create, add a call to config.write after the require('../cordova').config()


- Andrew


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


On Oct. 4, 2013, 9:18 p.m., Mark Koudritsky wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14495/
> -----------------------------------------------------------
> 
> (Updated Oct. 4, 2013, 9:18 p.m.)
> 
> 
> Review request for cordova.
> 
> 
> Bugs: CB-4748
>     https://issues.apache.org/jira/browse/CB-4748
> 
> 
> Repository: cordova-cli
> 
> 
> Description
> -------
> 
> CB-4748 Fail quickly if dir passed to cordova create is not empty.
> 
> 
> Diffs
> -----
> 
>   src/create.js 4b2b9506c16ab5adc04f88f3c8d53766266df5c6 
> 
> Diff: https://reviews.apache.org/r/14495/diff/
> 
> 
> Testing
> -------
> 
> ran twice:
> cordova create .
> and
> cordova create some_dir 
> 
> 
> Thanks,
> 
> Mark Koudritsky
> 
>


Re: Review Request 14495: CB-4748 Fail quickly if dir passed to cordova create is not empty.

Posted by Michal Mocny <mm...@chromium.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14495/#review26702
-----------------------------------------------------------


We leverage pre-creating a cordova directory in order to pre-create a .cordova/config.json.   I haven't confirmed, but this seem unlikely to work with this patch.   Phonegap-cli also uses this trick.

Likely this patch can land once we can add the ability to set the default config file contents (such as www dir).

- Michal Mocny


On Oct. 4, 2013, 9:18 p.m., Mark Koudritsky wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14495/
> -----------------------------------------------------------
> 
> (Updated Oct. 4, 2013, 9:18 p.m.)
> 
> 
> Review request for cordova.
> 
> 
> Bugs: CB-4748
>     https://issues.apache.org/jira/browse/CB-4748
> 
> 
> Repository: cordova-cli
> 
> 
> Description
> -------
> 
> CB-4748 Fail quickly if dir passed to cordova create is not empty.
> 
> 
> Diffs
> -----
> 
>   src/create.js 4b2b9506c16ab5adc04f88f3c8d53766266df5c6 
> 
> Diff: https://reviews.apache.org/r/14495/diff/
> 
> 
> Testing
> -------
> 
> ran twice:
> cordova create .
> and
> cordova create some_dir 
> 
> 
> Thanks,
> 
> Mark Koudritsky
> 
>