cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-12757) Cordova@7 saves wrong spec in config.xml for git plugins
Date Fri, 05 May 2017 15:55:04 GMT

    [ https://issues.apache.org/jira/browse/CB-12757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15998495#comment-15998495
] 

ASF GitHub Bot commented on CB-12757:
-------------------------------------

Github user audreyso commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/552#discussion_r115030625
  
    --- Diff: cordova-lib/src/cordova/plugin.js ---
    @@ -205,8 +205,29 @@ module.exports = function plugin(command, targets, opts) {
                                 .thenResolve(pluginInfo);
                             })
                             .then(function(pluginInfo){
    +                            var pkgJson;
    +                            var pkgJsonPath = path.join(projectRoot,'package.json');
    +
                                 // save to config.xml
                                 if(saveToConfigXmlOn(config_json, opts)){
    +                                // If statement to see if pkgJsonPath exists in the filesystem
    +                                if(fs.existsSync(pkgJsonPath)) {
    +                                    // Delete any previous caches of require(package.json)
    +                                    pkgJson = cordova_util.requireNoCache(pkgJsonPath);
    +                                }
    +                                // If package.json exists, the plugin object and plugin
name 
    +                                // will be added to package.json if not already there.
    +                                if(pkgJson){
    --- End diff --
    
    done!


> Cordova@7 saves wrong spec in config.xml for git plugins
> --------------------------------------------------------
>
>                 Key: CB-12757
>                 URL: https://issues.apache.org/jira/browse/CB-12757
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-cli, cordova-lib
>    Affects Versions: cordova7
>            Reporter: Darryl Pogue
>            Assignee: Audrey So
>            Priority: Minor
>              Labels: cordova7, reproduced, triaged
>             Fix For: cordova7
>
>
> (This possibly existed in earlier versions, I never used on the {{--save}} flag so I'm
not sure...)
> {code}
> cordova plugin add cordova-plugin-ayogo-push@AyogoHealth/cordova-plugin-push
> {code}
> It saves the github repo properly into package.json, but in config.xml it sets the spec
to the version number. This will fail to restore (from config.xml) because the plugin isn't
published to the npm registry.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message