@clawchatsai/connector 0.0.27 → 0.0.28
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/dist/index.js +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -82,11 +82,17 @@ async function ensureNativeModules(ctx) {
|
|
|
82
82
|
const modPkg = JSON.parse(fs.readFileSync(path.join(modDir, 'package.json'), 'utf-8'));
|
|
83
83
|
const installCmd = modPkg.scripts?.install;
|
|
84
84
|
if (installCmd) {
|
|
85
|
+
// Add local .bin dirs to PATH so prebuild-install and other local binaries resolve.
|
|
86
|
+
// Check both the module's own node_modules/.bin (hoisted deps) and the plugin-level one.
|
|
87
|
+
const localBin = [
|
|
88
|
+
path.join(modDir, 'node_modules', '.bin'),
|
|
89
|
+
path.join(pluginDir, 'node_modules', '.bin'),
|
|
90
|
+
].join(':');
|
|
85
91
|
execFileSync('sh', ['-c', installCmd], {
|
|
86
92
|
cwd: modDir,
|
|
87
93
|
stdio: 'pipe',
|
|
88
94
|
timeout: 120_000,
|
|
89
|
-
env: { ...process.env, npm_config_node_gyp: '' },
|
|
95
|
+
env: { ...process.env, PATH: `${localBin}:${process.env.PATH ?? ''}`, npm_config_node_gyp: '' },
|
|
90
96
|
});
|
|
91
97
|
}
|
|
92
98
|
else {
|