Error when querying bugs with 1+ parameters

Labels: lifecycle/rotten

Timeline

Daniel de Souza (danisztls) opened

When running the following command from the README:

git bug ls "status:open sort:edit"

It returns Error: unknown qualifier "status:open sort"

Though this works fine:

git bug ls "status:open" "sort:edit"

Steve Moyer (smoyer64) commented

It also works without any quotes at all - I'm a bit surprised that it didn't consider the whole enclosed string as a text query. The next example in the README definitely requires the quote (in Bash on Linux) to escape the space:

git bug ls "foo bar" baz

Clearly it would be possible to fix the README but making the argument parsing more robust would be more user-friendly. I'll take a look at whether the command-line parsing code in Cobra is platform dependent. I'm also wondering if there's a way to test this for all OSes and shells we support.

Daniel de Souza (danisztls) commented

I'm also wondering if there's a way to test this for all OSes and shells we support.

Can use a GH workflow for that and compare command outputs with expected values.

Steve Moyer (smoyer64) commented

Yes ... there are a ton of tests running via GHA on Windows, Mac OSX and Linux in 'git-bug'. What I meant is that we may not be able to test with every permutation of shell and OS, and that during testing (at least using go test), we can't control how the shell might process the arguments before it passes them to Go.

github-actions (github-actions) commented

This bot triages untriaged issues and PRs according to the following rules:

  • After 90 days of inactivity, the lifecycle/stale label is applied
  • After 30 days of inactivity since lifecycle/stale was applied, the issue is closed

To remove the stale status, you can:

  • Remove the lifecycle/stale label
  • Comment on this issue

github-actions (github-actions) added label lifecycle/stale

github-actions (github-actions) commented

This bot triages issues in order to help the maintainers identify what needs attention, according to the following lifecycle rules:

  • After 90 days of inactivity, lifecycle/stale is applied
  • After 90 days of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied

This bot will not automatically close stale issues.

To remove the stale status, you can:

  • Remove the stale label from this issue
  • Comment on this issue
  • Close this issue
  • Offer to help out with triaging

To avoid automatic lifecycle management of this issue, add lifecycle/frozen.

github-actions (github-actions) added label lifecycle/rotten

github-actions (github-actions) removed label lifecycle/stale

sudoforge removed label lifecycle/dormant