@trops/dash-core 0.1.51 → 0.1.52

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.
@@ -4828,6 +4828,25 @@ let _shellPath$1 = null;
4828
4828
  function getShellPath$1() {
4829
4829
  if (_shellPath$1 !== null) return _shellPath$1;
4830
4830
 
4831
+ const fallbackDirs = [
4832
+ "/usr/local/bin",
4833
+ "/opt/homebrew/bin",
4834
+ ];
4835
+
4836
+ // Add nvm/volta/nodenv paths if available
4837
+ const home = process.env.HOME || "";
4838
+ if (home) {
4839
+ fallbackDirs.push(`${home}/.volta/bin`);
4840
+ fallbackDirs.push(`${home}/.nodenv/shims`);
4841
+ try {
4842
+ const nvmDir = `${home}/.nvm/versions/node`;
4843
+ const versions = fs$5.readdirSync(nvmDir).sort();
4844
+ if (versions.length > 0) {
4845
+ fallbackDirs.push(`${nvmDir}/${versions[versions.length - 1]}/bin`);
4846
+ }
4847
+ } catch {}
4848
+ }
4849
+
4831
4850
  try {
4832
4851
  const { execSync } = require("child_process");
4833
4852
  const shell = process.env.SHELL || "/bin/bash";
@@ -4835,10 +4854,20 @@ function getShellPath$1() {
4835
4854
  encoding: "utf8",
4836
4855
  timeout: 5000,
4837
4856
  });
4838
- } catch {
4857
+ } catch (err) {
4858
+ console.warn("[mcpController] Failed to resolve shell PATH:", err.message);
4839
4859
  _shellPath$1 = process.env.PATH || "";
4840
4860
  }
4841
4861
 
4862
+ // Append fallback dirs that aren't already present
4863
+ const currentPaths = _shellPath$1.split(":");
4864
+ for (const dir of fallbackDirs) {
4865
+ if (!currentPaths.includes(dir)) {
4866
+ _shellPath$1 += `:${dir}`;
4867
+ }
4868
+ }
4869
+
4870
+ console.log("[mcpController] Resolved PATH:", _shellPath$1);
4842
4871
  return _shellPath$1;
4843
4872
  }
4844
4873