Add upgrade command to CLI
This commit is contained in:
parent
ea1c648c52
commit
3d0d40ab1a
12
src/cli.ts
12
src/cli.ts
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user