Skip to content

Conversation

@BowgartField
Copy link

Summary

  • Add scripts.teardown to jean.json — runs before a worktree is deleted
  • If the teardown script fails, deletion is blocked and the worktree is restored
  • Same environment variables as setup: JEAN_WORKSPACE_PATH, JEAN_ROOT_PATH, JEAN_BRANCH

Example

{
  "scripts": {
    "setup": "npm install",
    "teardown": "docker compose down",
    "run": "npm run dev"
  }
}

Test plan

  • Add a teardown script to jean.json and verify it runs on worktree deletion
  • Test with a failing script (exit 1) — deletion should be blocked, worktree reverts to 'ready'
  • Test without a teardown script — deletion works as before
  • Verify permanently_delete_worktree (archived) is unaffected

Add scripts.teardown to jean.json that runs before a worktree is deleted.
If the script fails, deletion is blocked and the worktree is restored.
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.

2 participants