Skip to content

Commit

Permalink
display errors with node-gyp and space in path - nodejs/node-gyp/issu…
Browse files Browse the repository at this point in the history
  • Loading branch information
steam0r committed Nov 19, 2024
1 parent e161acf commit 985fac8
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/electron/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,22 @@ class ElectronApp
}
catch (e)
{
result.exception = String(e);
result.error = true;
result.stderr += e;
result.stderr += e + e.stderr;
if (e.script && e.script.includes("gyp")) result.nativeCompile = true;
}
process.off("output", logToVariable);
if (result.exception && result.exception === "Error: command failed")
{
if (result.nativeCompile)
{
if (targetDir.includes(" "))
{
result.stderr = "tried to compile native module <a href=\"https://github.com/nodejs/node-gyp/issues/65\" target=\"_blank\">with a space in the pathname</a>, try moving your op...";
}
}
}
return result;
}

Expand Down

0 comments on commit 985fac8

Please sign in to comment.