This is an automated email from the ASF dual-hosted git repository. raphinesse pushed a commit to branch cross-spawn-test in repository https://gitbox.apache.org/repos/asf/cordova-lib.git
commit e5695ccdd07312785b4d9036f6b01b8aa55d13ee Author: Almir Kadric <[email protected]> AuthorDate: Tue Jul 17 03:23:57 2018 +0900 CB-14166: (cli) Fixed issue when install plugins on windows The npm package name is already wrapped in quotes to prevent special characters from being execute. However the additional win32 code was further injecting quotes around the version causing npm to return a EINVALIDTAGNAME error. The win32 code is redundant and seems to not be required. --- src/plugman/fetch.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/plugman/fetch.js b/src/plugman/fetch.js index d52bae7..2ae1b79 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
