Skip to content

Bump module path to v3 and add stable exit codes#302

Merged
AndreyVMarkelov merged 1 commit into
masterfrom
v3/stable-exit-codes
Jun 28, 2026
Merged

Bump module path to v3 and add stable exit codes#302
AndreyVMarkelov merged 1 commit into
masterfrom
v3/stable-exit-codes

Conversation

@AndreyVMarkelov

@AndreyVMarkelov AndreyVMarkelov commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Migrate Go module path to github.com/dropbox/dbxcli/v3 following major-version conventions
  • Add deterministic exit-code mapping (0-8) from JSON error codes for shell/CI scripting
  • Add partial_transfer error code for stdout download failures after partial output
  • Promote pflag from indirect to direct dependency

Exit code table:

Code Meaning JSON error codes
0 Success
1 Generic error command_failed, dropbox_api_error
2 Auth failure auth_required, auth_refresh_failed, auth_exchange_failed, app_key_required, env_token_still_active
3 Permission denied permission_denied
4 Not found not_found
5 Conflict path_conflict
6 Rate limited rate_limited
7 Validation error invalid_arguments, unknown_command, unknown_flag, structured_output_unsupported
8 Partial transfer partial_transfer

Test plan

  • go test ./... passes
  • golangci-lint run clean
  • go install github.com/dropbox/dbxcli/v3@latest works
  • dbxcli ls /nonexistent exits with code 4
  • dbxcli --output=json without credentials exits with code 2
  • dbxcli badcmd exits with code 7

Migrate module path to github.com/dropbox/dbxcli/v3 following Go
major-version conventions. Add deterministic exit-code mapping from
JSON error codes (0-8) so shell scripts and CI can branch on exit
status without parsing JSON. Add partial_transfer error code for
stdout download failures after partial output.
@AndreyVMarkelov AndreyVMarkelov merged commit 6ea6381 into master Jun 28, 2026
8 checks passed
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.

1 participant