fix(cli): exit codes, option handling and Ctrl+C for the accounts and dry-run commands; the log follows GCLO_DATA_DIR #159

Closed
opened 2026-11-10 22:16:42 +00:00 by james.maes · 0 comments
Owner

Found in the 1.1.1 review. A batch of small command-line defects, each with a regression test.

  • gclo sync --dry-run that is canceled while the repositories are being listed exits 0 with an empty result, as if the organization had none.
  • gclo accounts add|edit|remove: a failure of the accounts file or of Windows Credential Manager ends with exit code 70 ("unexpected error, please report it"), where the help promises 2.
  • gclo accounts -h is reported as an unknown subcommand.
  • gclo accounts edit accepts a blank --rename, --org, or --target.
  • A relative --target is stored as typed, so the account means a different folder depending on where it is later used from (the desktop app, another working directory).
  • --description= is rejected although --description "" works.
  • The activity log of the CLI ignores GCLO_DATA_DIR: it always goes to the default data folder, while accounts and settings follow the variable.
  • Ctrl+C: commands that do not observe cancellation (accounts) and the interactive token prompt swallow the first Ctrl+C ("Canceling...") and then carry on.
Found in the 1.1.1 review. A batch of small command-line defects, each with a regression test. - `gclo sync --dry-run` that is canceled while the repositories are being listed exits 0 with an empty result, as if the organization had none. - `gclo accounts add|edit|remove`: a failure of the accounts file or of Windows Credential Manager ends with exit code 70 ("unexpected error, please report it"), where the help promises 2. - `gclo accounts -h` is reported as an unknown subcommand. - `gclo accounts edit` accepts a blank `--rename`, `--org`, or `--target`. - A relative `--target` is stored as typed, so the account means a different folder depending on where it is later used from (the desktop app, another working directory). - `--description=` is rejected although `--description ""` works. - The activity log of the CLI ignores `GCLO_DATA_DIR`: it always goes to the default data folder, while accounts and settings follow the variable. - Ctrl+C: commands that do not observe cancellation (`accounts`) and the interactive token prompt swallow the first Ctrl+C ("Canceling...") and then carry on.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/gclo#159