[ 
https://issues.apache.org/jira/browse/RIPPLE-61?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marko Raatikka updated RIPPLE-61:
---------------------------------

    Description: 
Ripple calls _cordova prepare_ expecting to find cordova globally installed. 
And worse, in case it doesn't it fails silently. The offending line:

{code:title=lib/server/emulate/hosted.js.js: line 166|borderStyle=solid}
exec('cordova prepare ' + req.staticPlatform, function () { ...
{code}

I have a fix for this where we fallback to exec only if a call to 
_require.resolve('cordova')_ fails. In any other case, we'll use cordova's 
prepare module for the task. See GitHub for the related pull request: 
https://github.com/apache/incubator-ripple/pull/24

  was:
Ripple calls _cordova prepare_ expecting to find cordova globally installed. 
And worse, in case it doesn't it fails silently. The offending line:

{code:title=lib/server/emulate/hosted.js.js: line 166|borderStyle=solid}
exec('cordova prepare ' + req.staticPlatform, function () { ...
{code}

I have a fix for this where we fallback to exec only if a call to 
_require.resolve('cordova')_ fails. In any other case, we'll use cordova's 
prepare module for the task. See the GitHub repo for the related pull request: 
https://github.com/apache/incubator-ripple/pull/24


> Ripple expects to find Cordova globally installed
> -------------------------------------------------
>
>                 Key: RIPPLE-61
>                 URL: https://issues.apache.org/jira/browse/RIPPLE-61
>             Project: Apache Ripple
>          Issue Type: Bug
>            Reporter: Marko Raatikka
>            Priority: Minor
>              Labels: cordova, cordova-cli, prepare, require
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Ripple calls _cordova prepare_ expecting to find cordova globally installed. 
> And worse, in case it doesn't it fails silently. The offending line:
> {code:title=lib/server/emulate/hosted.js.js: line 166|borderStyle=solid}
> exec('cordova prepare ' + req.staticPlatform, function () { ...
> {code}
> I have a fix for this where we fallback to exec only if a call to 
> _require.resolve('cordova')_ fails. In any other case, we'll use cordova's 
> prepare module for the task. See GitHub for the related pull request: 
> https://github.com/apache/incubator-ripple/pull/24



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to