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-10921) Plugin not installed when variable not supplied, no error message
Date Mon, 11 Apr 2016 12:26:25 GMT

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

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

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

    https://github.com/apache/cordova-lib/pull/420#discussion_r59195085
  
    --- Diff: cordova-lib/src/cordova/plugin.js ---
    @@ -157,6 +157,7 @@ module.exports = function plugin(command, targets, opts) {
     
                                 if (missingVariables.length) {
                                     shell.rm('-rf', pluginInfo.dir);
    +                                events.emit('verbose', 'Removing ' + pluginInfo.dir +
' due to installation failure');
                                     var msg = 'Variable(s) missing (use: --variable ' + missingVariables.join('=value
--variable ') + '=value).';
    --- End diff --
    
    I think if we add the change below then we will have exactly the same message to be traced
twice. The pic above with log trace sample looks good.
    
    > I think we should also emit a message about the variables missing.(events.emit(msg))


> Plugin not installed when variable not supplied, no error message
> -----------------------------------------------------------------
>
>                 Key: CB-10921
>                 URL: https://issues.apache.org/jira/browse/CB-10921
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 6.0.0
>         Environment: Mac OS 10.11.3.
>            Reporter: Jacob Weber
>            Assignee: Vladimir Kotikov
>            Priority: Minor
>              Labels: triaged, wfc
>
> When I include a plugin in {{config.xml}}, and the plugin declares a {{<preference>}},
but the {{config.xml}} doesn't supply a corresponding {{<variable>}}, {{cordova prepare}}
doesn't show an error message.
> I started with a new project, with no plugins or platforms. Then I added specific {{<engine>}}
versions to config.xml. Finally I added a {{<plugin>}} whose {{plugin.xml}} file declares
a variable {{<preference name="URL_SCHEME" />}}. But I don't supply the required {{<variable>}}:
> {code}
>     <engine name="ios" spec="~4.1.0" />
>     <engine name="android" spec="~5.1.1" />
>     <plugin name="cordova-plugin-whitelist" spec="1" />
>     <plugin name="cordova-plugin-customurlscheme" spec="~4.1.5" />
> {code}
> When I run {{cordova prepare}}, it says:
> {code}
> Copying plugin "/Users/someone/.npm/cordova-plugin-customurlscheme/4.1.5/package" =>
"/Users/someone/CordovaTest/plugins/cordova-plugin-customurlscheme"
> {code}
> but it doesn't actually copy the plugin there. Nor does it make any changes to either
platform's {{config.xml}} file, or to any other config files.
> On the other hand, if I try to manually install the plugin using {{cordova plugin add
cordova-plugin-customurlscheme}}, it shows me the appropriate error message:
> {code}
> Error: Variable(s) missing (use: --variable URL_SCHEME=value).
> {code}
> Side note: it seems to be repeating certain steps for every plugin installed. For example,
it repeats:
> {code}
> Wrote out Android application name to "CordovaTest"
> Wrote out Android package name to "com.test.cordovatest"
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message