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: command not found on empty arg #886

Closed
wants to merge 0 commits into from
Closed

Conversation

royra
Copy link
Contributor

@royra royra commented Nov 26, 2023

This PR fixes an edge case bug in command ID parsing when the topic separator is a space

When argv contains an empty string arg, the command ID extracted contains an extra colon.

An empty string arg can occur when running the CLI as part of a script.

Example:

set FOO=""
cli cmd ${FOO} --bar

Result: command not found "cmd"

Root cause: incorrect parsing in standardizeIDFromArgv, which for the above example returned cmd: as the command ID.

royra pushed a commit to livecycle/preevy that referenced this pull request Nov 26, 2023
royra pushed a commit to livecycle/preevy that referenced this pull request Nov 27, 2023
royra pushed a commit to livecycle/preevy that referenced this pull request Nov 27, 2023
royra pushed a commit to livecycle/preevy that referenced this pull request Nov 27, 2023
royra pushed a commit to livecycle/preevy that referenced this pull request Nov 28, 2023
* introduce default plugins, with configuration to disable them
* refactor the GitHub plugin
  - rename package from `plugin-github-pr-link` to `plugin-github` to make room for more features
  - make configuration and flags more consistent
  - fix docs
  - make plugin enabled by default
* fix: command id parsing bug in oclif. patch for PR oclif/core#886
* use patched @oclif/core
* fix: empty args
* ci: canary versions now use HEAD instead of merge commit
@mdonnalley
Copy link
Contributor

@royra This looks like the same changes as #880 - is that intentional?

@royra
Copy link
Contributor Author

royra commented Nov 29, 2023

@royra This looks like the same changes as #880 - is that intentional?

@mdonnalley you're right! I opened this PR with the wrong branch by mistake. when I tried to fix it just now it closed, so I reopened as #887. sorry for the mixup.

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

Successfully merging this pull request may close these issues.

2 participants