File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -307,7 +307,7 @@ download_and_install() {
307307 unzip -q " $tmp_dir /$filename " -d " $tmp_dir "
308308 fi
309309
310- mv " $tmp_dir /bin/opencode" " $INSTALL_DIR "
310+ mv " $tmp_dir /bin/opencode-dev " " $INSTALL_DIR /opencode "
311311 chmod 755 " ${INSTALL_DIR} /opencode"
312312 rm -rf " $tmp_dir "
313313}
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ if (!arch) {
5050 arch = os . arch ( )
5151}
5252const base = "opencode-" + platform + "-" + arch
53- const binaryName = process . env . OPENCODE_DEV_BIN || "opencode"
53+ const binaryName = process . env . OPENCODE_DEV_BIN || "opencode-dev "
5454const binary = platform === "windows" ? binaryName + ".exe" : binaryName
5555
5656const names = ( ( ) => {
@@ -82,11 +82,16 @@ const names = (() => {
8282} ) ( )
8383
8484function findBinary ( startDir ) {
85- const localBinary = path . join ( scriptDir , "bin" , binary )
85+ const localBinary = path . join ( scriptDir , binary )
8686 if ( fs . existsSync ( localBinary ) ) {
8787 return localBinary
8888 }
8989
90+ const localBinDir = path . join ( scriptDir , "bin" , binary )
91+ if ( fs . existsSync ( localBinDir ) ) {
92+ return localBinDir
93+ }
94+
9095 let current = startDir
9196 for ( ; ; ) {
9297 const modules = path . join ( current , "node_modules" )
You can’t perform that action at this time.
0 commit comments