File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,13 @@ import { GlobalConfig } from "./global/config"
2020import { Installation } from "./installation"
2121; ( async ( ) => {
2222 if ( Installation . VERSION === "dev" ) return
23+ if ( Installation . isSnapshot ( ) ) return
2324 const config = await GlobalConfig . get ( )
2425 if ( config . autoupdate === false ) return
2526 const latest = await Installation . latest ( )
2627 if ( Installation . VERSION === latest ) return
2728 const method = await Installation . method ( )
29+ if ( method === "unknown" ) return
2830 await Installation . upgrade ( method , latest ) . catch ( ( ) => { } )
2931} ) ( )
3032
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ export namespace Installation {
2323 }
2424 }
2525
26+ export function isSnapshot ( ) {
27+ return VERSION . startsWith ( "0.0.0" )
28+ }
29+
2630 export async function method ( ) {
2731 if ( process . execPath . includes ( path . join ( ".opencode" , "bin" ) ) ) return "curl"
2832 const exec = process . execPath . toLowerCase ( )
You can’t perform that action at this time.
0 commit comments