File tree Expand file tree Collapse file tree
packages/opencode/src/cli/cmd Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,14 +123,15 @@ export const TuiCommand = cmd({
123123 const file = Bun . file ( binary )
124124 if ( ! ( await file . exists ( ) ) ) {
125125 await Bun . write ( file , tui , { mode : 0o755 } )
126- await fs . chmod ( binary , 0o755 )
126+ if ( process . platform !== "win32" ) await fs . chmod ( binary , 0o755 )
127127 }
128128 cmd = [ binary ]
129129 }
130130 if ( ! tui ) {
131131 const dir = Bun . fileURLToPath ( new URL ( "../../../../tui/cmd/opencode" , import . meta. url ) )
132- await $ `go build -o ./dist/tui ./main.go` . cwd ( dir )
133- cmd = [ path . join ( dir , "dist/tui" ) ]
132+ let binaryName = `./dist/tui${ process . platform === "win32" ? ".exe" : "" } `
133+ await $ `go build -o ${ binaryName } ./main.go` . cwd ( dir )
134+ cmd = [ path . join ( dir , binaryName ) ]
134135 }
135136 Log . Default . info ( "tui" , {
136137 cmd,
You can’t perform that action at this time.
0 commit comments