apache / cordova-cli

Apache Cordova CLI
Apache License 2.0
940 stars 340 forks source link

`cordova plugin add` with folder with trailing backward slash crashes on Windows #453

Open janpio opened 5 years ago

janpio commented 5 years ago

On Windows, this fails:

λ cordova plugin add "..\..\Cordova\cordova-plugin-device\" --verbose
Invalid attribute predicate

but this works:

E:\Projects\throwaway\cordovaIonicRestorePluginBug (master -> origin) (helloworld@1.0.0)
λ cordova plugin add "../..\Cordova\cordova-plugin-device/" --verbose
No scripts found for hook "before_plugin_add".
Calling plugman.fetch on plugin "../..\Cordova\cordova-plugin-device/"
...

Seems the trailing backward slash is crashing something.

Info

λ cordova -v
9.0.0 (cordova-lib@9.0.1)
janpio commented 5 years ago

Only happens if the path is wrapped in double quotes additionally to the trailing backward slash.