@trops/dash-core 0.1.63 → 0.1.64

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.
@@ -4904,10 +4904,21 @@ function getShellPath$1() {
4904
4904
 
4905
4905
  try {
4906
4906
  const shell = process.env.SHELL || "/bin/bash";
4907
- _shellPath$1 = execSync(`${shell} -ilc 'echo -n "$PATH"'`, {
4908
- encoding: "utf8",
4909
- timeout: 5000,
4910
- });
4907
+ const marker = "__DASH_PATH__";
4908
+ const raw = execSync(
4909
+ `${shell} -ilc 'echo "${marker}$PATH${marker}"'`,
4910
+ { encoding: "utf8", timeout: 5000 },
4911
+ );
4912
+ // Extract PATH between markers, stripping session restore noise
4913
+ const startIdx = raw.indexOf(marker);
4914
+ const endIdx = raw.lastIndexOf(marker);
4915
+ if (startIdx !== -1 && endIdx > startIdx) {
4916
+ _shellPath$1 = raw
4917
+ .substring(startIdx + marker.length, endIdx)
4918
+ .replace(/[\r\n]/g, "");
4919
+ } else {
4920
+ _shellPath$1 = process.env.PATH || "";
4921
+ }
4911
4922
  } catch (err) {
4912
4923
  console.warn("[mcpController] Failed to resolve shell PATH:", err.message);
4913
4924
  _shellPath$1 = process.env.PATH || "";