@openagents-org/agent-connector 0.2.4 → 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 +13 -0
package/package.json
CHANGED
package/src/installer.js
CHANGED
|
@@ -139,6 +139,7 @@ class Installer {
|
|
|
139
139
|
if (process.platform === 'win32') {
|
|
140
140
|
const npmBin = path.join(process.env.APPDATA || '', 'npm');
|
|
141
141
|
if (npmBin) extraPaths.push(npmBin);
|
|
142
|
+
extraPaths.push('C:\\Program Files\\nodejs');
|
|
142
143
|
}
|
|
143
144
|
for (const p of extraPaths) {
|
|
144
145
|
if (p && !(env.PATH || '').includes(p)) {
|
|
@@ -226,6 +227,18 @@ class Installer {
|
|
|
226
227
|
if (process.platform === 'win32') {
|
|
227
228
|
const npmBin = path.join(process.env.APPDATA || '', 'npm');
|
|
228
229
|
if (npmBin) extraPaths.push(npmBin);
|
|
230
|
+
// Common binary locations on Windows
|
|
231
|
+
extraPaths.push('C:\\Program Files\\nodejs');
|
|
232
|
+
extraPaths.push('C:\\Program Files (x86)\\nodejs');
|
|
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
|
+
}
|
|
229
242
|
}
|
|
230
243
|
for (const p of extraPaths) {
|
|
231
244
|
if (p && !(env.PATH || '').includes(p)) {
|