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-14166) Cordova on windows fails when adding plugin
Date Thu, 06 Sep 2018 13:09:00 GMT

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

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

janpio closed pull request #622: CB-14166: (cli) Fixed issue when installing plugins on windows
URL: https://github.com/apache/cordova-lib/pull/622
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/plugman/fetch.js b/src/plugman/fetch.js
index d52bae7aa..2ae1b7916 100644
--- a/src/plugman/fetch.js
+++ b/src/plugman/fetch.js
@@ -120,7 +120,6 @@ function fetchPlugin (plugin_src, plugins_dir, options) {
             var parsedSpec = pluginSpec.parse(plugin_src);
             var P;
             var skipCopyingPlugin;
-            var specContainsSpecialCharacters = false;
             plugin_dir = path.join(plugins_dir, parsedSpec.id);
             // if the plugin has already been fetched, use it.
             if (fs.existsSync(plugin_dir)) {
@@ -135,16 +134,7 @@ function fetchPlugin (plugin_src, plugins_dir, options) {
                     projectRoot = options.projectRoot;
                 }
 
-                if (process.platform === 'win32' && parsedSpec.version) {
-                    var windowsShellSpecialCharacters = ['&', '\\', '<', '>', '^',
'|'];
-                    specContainsSpecialCharacters = windowsShellSpecialCharacters.some(function
(character) {
-                        return parsedSpec.version.indexOf(character);
-                    });
-                }
-
-                var fetchPluginSrc = specContainsSpecialCharacters ?
-                    parsedSpec.package + '@"' + parsedSpec.version + '"' : plugin_src;
-                P = fetch(fetchPluginSrc, projectRoot, options);
+                P = fetch(plugin_src, projectRoot, options);
                 skipCopyingPlugin = false;
             }
             return P


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Cordova on windows fails when adding plugin
> -------------------------------------------
>
>                 Key: CB-14166
>                 URL: https://issues.apache.org/jira/browse/CB-14166
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-windows
>            Reporter: takuya
>            Assignee: Jesse MacFadyen
>            Priority: Blocker
>         Attachments: screenshot-1.png, スクリーンショット 2018-09-06 11.36.42.png
>
>
> cordova on windows fails to add the plugin.
> This error happens even when cordova-plugin-whitelist.
> Therefore `cordova platform add windows` also fails.
> For example,
> ```
> > cordova create sample
> > cd sample
> > cordova platform add windows
> ```
> brings following error.
> ```
> ...
> Check your connection and plugin name/version/URL.
> Error: C:\Program Files (x86)\Nodist\bin\npm.exe: Command failed with exit code 1 Error
output:
> npm ERR! code EINVALIDTAGNAME
> npm ERR! Invalid tag name ""1"": Tags may not have any characters that encodeURIComponent
encodes.
> ```
> This error happens for windows environment only.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message