[
https://issues.apache.org/jira/browse/CB-10519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15140913#comment-15140913
]
ASF GitHub Bot commented on CB-10519:
-------------------------------------
GitHub user vladimir-kotikov opened a pull request:
https://github.com/apache/cordova-lib/pull/384
CB-10519 Wrap all sync calls inside of `cordova.raw` methods into promises
This is a fix for [CB-10519](https://issues.apache.org/jira/browse/CB-10519)
This PR fixes the issue when promise returned from `cordova.raw` API would
never be rejected if command is ran outside of cordova project. Instead
syncronous exception will be thrown (by `util.preProcessOptions`), which is
definitely unexpected for promise based API.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/MSOpenTech/cordova-lib CB-10519
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-lib/pull/384.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #384
----
commit 747c26e64a491645fad1dd109afb734bc9a5ce4a
Author: Vladimir Kotikov <[email protected]>
Date: 2016-02-10T12:45:19Z
CB-10519 Wrap all sync calls inside of `cordova.raw` methods into promises
----
> Using cordova.raw API outside of cordova project results in uncaught
> exception instead or promise rejection
> -----------------------------------------------------------------------------------------------------------
>
> Key: CB-10519
> URL: https://issues.apache.org/jira/browse/CB-10519
> Project: Apache Cordova
> Issue Type: Bug
> Components: CordovaLib
> Affects Versions: 6.0.0
> Reporter: Vladimir Kotikov
> Assignee: Vladimir Kotikov
> Labels: triaged
>
> When trying to {{cordova.raw.platfom('add', ...)}} outside of cordova project
> the following error message logged to console:
> > Error: Current working directory is not a Cordova-based project.
> However, the error callback for {{cordova.raw.platfom('add', ...)}} isn't
> called at all.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]