yup
This commit is contained in:
parent
5cc102ccdf
commit
1549ddc4e6
|
|
@ -99,17 +99,11 @@ export async function action(
|
|||
const spin = spinner("Creating worktree", branch)
|
||||
let branchCreated = false
|
||||
try {
|
||||
<<<<<<< HEAD
|
||||
await git.createWorktree(branch, worktreeAbs, root)
|
||||
const wt = await git.createWorktree(branch, worktreeAbs, root)
|
||||
branchCreated = wt.branchCreated
|
||||
const symlinkPath = join(root, '.sandlot', branch)
|
||||
await mkdir(dirname(symlinkPath), { recursive: true })
|
||||
await symlink(worktreeAbs, symlinkPath)
|
||||
=======
|
||||
const wt = await git.createWorktree(branch, worktreeAbs, root)
|
||||
branchCreated = wt.branchCreated
|
||||
await mkdir(join(root, '.sandlot'), { recursive: true })
|
||||
await symlink(worktreeAbs, join(root, '.sandlot', branch))
|
||||
>>>>>>> 597eb97 (Track branch creation to avoid deleting pre-existing branches)
|
||||
|
||||
spin.text = "Starting container"
|
||||
await vm.ensure((msg) => { spin.text = msg })
|
||||
|
|
@ -117,13 +111,8 @@ export async function action(
|
|||
} catch (err) {
|
||||
spin.fail(String((err as Error).message ?? err))
|
||||
await git.removeWorktree(worktreeAbs, root).catch(() => {})
|
||||
<<<<<<< HEAD
|
||||
await git.deleteLocalBranch(branch, root).catch(() => {})
|
||||
await unlinkSessionSymlink(root, branch)
|
||||
=======
|
||||
if (branchCreated) await git.deleteLocalBranch(branch, root).catch(() => {})
|
||||
await unlink(join(root, '.sandlot', branch)).catch(() => {})
|
||||
>>>>>>> 597eb97 (Track branch creation to avoid deleting pre-existing branches)
|
||||
await unlinkSessionSymlink(root, branch)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user