Add upgrade command to CLI

This commit is contained in:
Chris Wanstrath 2026-03-08 22:23:37 -07:00
parent ea1c648c52
commit 3d0d40ab1a

View File

@ -183,6 +183,18 @@ program
registerVmCommands(program)
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
.command("version")
.description("Print the version number")