adp-openclaw 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/package.json +1 -1
- package/src/session-history.ts +9 -1
package/package.json
CHANGED
package/src/session-history.ts
CHANGED
|
@@ -550,9 +550,17 @@ async function executeClawCommand(
|
|
|
550
550
|
const binary = parts[0];
|
|
551
551
|
const preArgs = parts.slice(1);
|
|
552
552
|
|
|
553
|
+
// Ensure node's bin directory is in PATH (fixes nvm/pnpm environments
|
|
554
|
+
// where the spawned shell may not have node in its PATH)
|
|
555
|
+
const nodeDir = path.dirname(process.execPath);
|
|
556
|
+
const currentPath = process.env.PATH || "";
|
|
557
|
+
const envPath = currentPath.includes(nodeDir)
|
|
558
|
+
? currentPath
|
|
559
|
+
: `${nodeDir}:${currentPath}`;
|
|
560
|
+
|
|
553
561
|
const spawnOpts: SpawnOptions = {
|
|
554
562
|
timeout,
|
|
555
|
-
env: { ...process.env },
|
|
563
|
+
env: { ...process.env, PATH: envPath },
|
|
556
564
|
};
|
|
557
565
|
|
|
558
566
|
const child = spawn(binary, [...preArgs, command, ...fullArgs], spawnOpts);
|