Skip to content

fix: non-zero exit on delete cancellation; remove unsupported routine delete#2

Merged
asabirov merged 1 commit into
mainfrom
fix/routine-delete-bugs
Apr 7, 2026
Merged

fix: non-zero exit on delete cancellation; remove unsupported routine delete#2
asabirov merged 1 commit into
mainfrom
fix/routine-delete-bugs

Conversation

@asabirov
Copy link
Copy Markdown
Owner

@asabirov asabirov commented Apr 7, 2026

Summary

  • Bug 1 fix: All delete commands (workout delete, folder delete) now return an error when the user cancels the confirmation prompt, producing a non-zero exit code. Previously they returned nil (exit 0), making it impossible for scripts to detect cancellation.

  • Bug 2 fix: Removed routine delete command and DeleteRoutine API method entirely. The Hevy API does not expose a DELETE /routines/{id} endpoint (per the official API docs — only GET, POST, PUT are available for routines), so the command always failed with NOT_FOUND.

Closes obay#4

Test plan

  • Run hevycli workout delete <id>, cancel → verify exit code is non-zero
  • Run hevycli folder delete <id>, cancel → verify exit code is non-zero
  • Verify hevycli routine delete no longer exists as a subcommand
  • Run hevycli routine --help → confirm delete is not listed

…routine delete

- All delete commands (workout, folder) now return an error on
  cancellation so the process exits non-zero, letting scripts detect
  the no-op.

- Remove `routine delete` command and `DeleteRoutine` client method
  entirely — the Hevy API has no DELETE /routines/{id} endpoint, so the
  command always failed with NOT_FOUND.

Closes obay#4
@asabirov asabirov merged commit 20f6071 into main Apr 7, 2026
2 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.

routine delete: exits 0 on cancellation; confirmed delete returns NOT_FOUND for listed routine

1 participant