Skip to content

Conversation

@rankaiyx
Copy link

feat: add post-rollback hook mechanism

  • Implement run_hooks() function to execute post-rollback commands
  • Support multiple commands from config's [hooks] section
  • Handle dry-run mode for hook commands
  • Execute hooks after successful rollback
  • Maintain original error handling and rollback safety
  • Ignore empty lines and comments in hook commands
  • Log command execution with exit status reporting
  • Follow the principle of minimal modification.

@rankaiyx
Copy link
Author

I thought about it and realized that there is really no need to integrate a special cleaning function, as it is not part of the program's job. Perhaps adding a hook function would be a better choice.
How does that sound?

@rankaiyx rankaiyx changed the title Rankaiyx patch 3 add hook feat: add post-rollback hook mechanism Jun 11, 2025
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