Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix config list command #419

Merged
merged 1 commit into from
Apr 10, 2019
Merged

Fix config list command #419

merged 1 commit into from
Apr 10, 2019

Conversation

ltm
Copy link
Contributor

@ltm ltm commented Apr 3, 2019

The cordova config list command will be executed for any command with list as an argument, such as cordova plugin list. This PR fixes the if-statement to only apply to cordova config list.

Platforms affected

Motivation and Context

This behavior becomes evident due to #418:

$ npm install -g cordova@latest
$ rm ~/.config/configstore/cordova-config.json
$ cordova plugin list
Current working directory is not a Cordova-based project.
Error: ENOENT: no such file or directory, open '/Users/ltm/.config/configstore/cordova-config.json'

The error is triggered by the config list command which is incorrectly being executed as part of the plugin list command.

Description

Testing

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

The condition is currently true for any command with `list` as an
argument, such as `cordova plugin list`.
Copy link
Contributor

@raphinesse raphinesse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Thanks for your contribution!

@raphinesse raphinesse merged commit 88cc5d9 into apache:master Apr 10, 2019
@ltm ltm deleted the fix-config-list branch April 10, 2019 21:31
@ety001
Copy link

ety001 commented May 24, 2019

Has this fix code released?

@janpio
Copy link
Member

janpio commented May 24, 2019

Last release was March 20, so no.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants