16 lines
311 B
TypeScript
16 lines
311 B
TypeScript
import * as vm from "../vm.ts"
|
|
import { requireSession } from "./helpers.ts"
|
|
|
|
export async function action(branch?: string) {
|
|
if (!branch) {
|
|
await vm.ensure()
|
|
await vm.shell()
|
|
return
|
|
}
|
|
|
|
const { session } = await requireSession(branch)
|
|
|
|
await vm.ensure()
|
|
await vm.shell(session.worktree)
|
|
}
|