File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ export const UpgradeCommand = {
25
25
prompts . outro ( "Done" )
26
26
return
27
27
}
28
+ prompts . log . info ( "Installed via " + method )
28
29
const target = args . target ?? ( await Installation . latest ( ) )
29
30
prompts . log . info ( `From ${ Installation . VERSION } → ${ target } ` )
30
31
const spinner = prompts . spinner ( )
Original file line number Diff line number Diff line change @@ -66,6 +66,10 @@ export namespace Installation {
66
66
name : "bun" as const ,
67
67
command : ( ) => $ `bun pm ls -g` . throws ( false ) . text ( ) ,
68
68
} ,
69
+ {
70
+ name : "brew" as const ,
71
+ command : ( ) => $ `brew list --formula opencode-ai` . throws ( false ) . text ( ) ,
72
+ } ,
69
73
]
70
74
71
75
checks . sort ( ( a , b ) => {
@@ -97,13 +101,18 @@ export namespace Installation {
97
101
const cmd = ( ( ) => {
98
102
switch ( method ) {
99
103
case "curl" :
100
- return $ `curl -fsSL https://opencode.ai/install | bash`
104
+ return $ `curl -fsSL https://opencode.ai/install | bash` . env ( {
105
+ VERSION : target ,
106
+ ...process . env ,
107
+ } )
101
108
case "npm" :
102
109
return $ `npm install -g opencode-ai@${ target } `
103
110
case "pnpm" :
104
111
return $ `pnpm install -g opencode-ai@${ target } `
105
112
case "bun" :
106
113
return $ `bun install -g opencode-ai@${ target } `
114
+ case "brew" :
115
+ return $ `brew install sst/tap/opencode`
107
116
default :
108
117
throw new Error ( `Unknown method: ${ method } ` )
109
118
}
You can’t perform that action at this time.
0 commit comments