Prechádzať zdrojové kódy

core: fix CLI tools from npm packages not being accessible after install on Windows

Dax Raad 1 mesiac pred
rodič
commit
ceb79c786a

+ 1 - 3
packages/opencode/src/config/config.ts

@@ -287,9 +287,7 @@ export namespace Config {
 
     // Install any additional dependencies defined in the package.json
     // This allows local plugins and custom tools to use external packages
-    await Npm.install(dir).catch((err) => {
-      log.warn("failed to install dependencies", { dir, error: err })
-    })
+    await Npm.install(dir)
   }
 
   async function isWritable(dir: string) {

+ 2 - 2
packages/opencode/src/npm/index.ts

@@ -52,7 +52,7 @@ export namespace Npm {
 
     const arborist = new Arborist({
       path: dir,
-      binLinks: !(process.platform === "win32" && process.env.CI),
+      binLinks: true,
       progress: false,
       savePrefix: "",
     })
@@ -86,7 +86,7 @@ export namespace Npm {
     log.info("installing dependencies", { dir })
     const arb = new Arborist({
       path: dir,
-      binLinks: false,
+      binLinks: true,
       progress: false,
       savePrefix: "",
     })