Skip to content

Remove a worktree the launch added when the launch fails before recording it #660

Open

Description

@tps-flint

Found in the review of #648 (sandboxed launch).

When a selected-runtime launch adds a worktree but then fails before its git directories resolve (for example, onStart throws after git worktree add), the launch should remove the worktree it created. Today the parent records the worktree only after onStart returns, so a throw leaves it behind.

Acceptance: a test where git worktree add succeeds and the next step fails; afterwards the worktree and its branch are gone and git worktree list shows no stale entry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions