This commit is contained in:
Dax Raad
2025-05-30 20:47:56 -04:00
parent 9a26b3058f
commit f3da73553c
178 changed files with 765 additions and 3382 deletions

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env node
import { createRequire } from "node:module"
const require = createRequire(import.meta.url)
import path from "path"
import { execFileSync } from "child_process"
let resolved = process.env.SST_BIN_PATH
if (!resolved) {
const name = `opencode-${process.platform}-${process.arch}`
const binary = process.platform === "win32" ? "opencode.exe" : "opencode"
try {
resolved = require.resolve(path.join(name, "bin", binary))
} catch (ex) {
console.error(
`It seems that your package manager failed to install the right version of the SST CLI for your platform. You can try manually installing the "${name}" package`,
)
process.exit(1)
}
}
process.on("SIGINT", () => {})
try {
execFileSync(resolved, process.argv.slice(2), {
stdio: "inherit",
})
} catch (ex) {
process.exit(1)
}