apache / apache/cordova-cli

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

Open
#453 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
967
Forks
344
Avg merge
8h 41m
Merged PRs (30d)
9

Description

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)
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the Windows command using a local plugin path with a trailing backward slash, then trace the CLI's plugin-add path handling to find where the path becomes an invalid attribute predicate. Done means the command succeeds with the trailing backslash and the existing forward-slash form continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.