@openagents-org/agent-connector 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/installer.js +10 -6
package/package.json
CHANGED
package/src/installer.js
CHANGED
|
@@ -227,14 +227,18 @@ class Installer {
|
|
|
227
227
|
if (process.platform === 'win32') {
|
|
228
228
|
const npmBin = path.join(process.env.APPDATA || '', 'npm');
|
|
229
229
|
if (npmBin) extraPaths.push(npmBin);
|
|
230
|
-
// Common
|
|
230
|
+
// Common binary locations on Windows
|
|
231
231
|
extraPaths.push('C:\\Program Files\\nodejs');
|
|
232
232
|
extraPaths.push('C:\\Program Files (x86)\\nodejs');
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
233
|
+
extraPaths.push('C:\\Program Files\\Git\\cmd');
|
|
234
|
+
extraPaths.push('C:\\Program Files (x86)\\Git\\cmd');
|
|
235
|
+
// Also try to find node/git via where
|
|
236
|
+
for (const bin of ['node', 'git']) {
|
|
237
|
+
try {
|
|
238
|
+
const p = execSync(`where ${bin}`, { encoding: 'utf-8', timeout: 3000 }).split(/\r?\n/)[0].trim();
|
|
239
|
+
if (p) extraPaths.push(path.dirname(p));
|
|
240
|
+
} catch {}
|
|
241
|
+
}
|
|
238
242
|
}
|
|
239
243
|
for (const p of extraPaths) {
|
|
240
244
|
if (p && !(env.PATH || '').includes(p)) {
|