Add upgrade command to CLI

This commit is contained in:
Chris Wanstrath 2026-03-12 14:24:55 -07:00
parent b9f3d7f6e8
commit f128053183

View File

@ -264,4 +264,16 @@ $ true
[0]`) [0]`)
}) })
program
.command("upgrade")
.description("Upgrade sandlot to the latest version")
.action(async () => {
const result = await Bun.spawn(["bun", "install", "-g", "@because/sandlot@latest"], {
stdin: "inherit",
stdout: "inherit",
stderr: "inherit",
}).exited
process.exit(result)
})
program.parse() program.parse()