#!/bin/sh # Runs before `opencode-sandbox wt rm [args]` removes the worktree, in the worktree. # Environment: WT_DIR, WT_BRANCH, WT_SLUG, MAIN_ROOT. Arguments: extra args of `wt rm`. # Rename to wt-pre-rm and chmod +x to enable. A non-zero exit aborts the removal. set -eu # Example: stop the worktree's stack # make down || true