Skip to content

Commit 985fac8

Browse files
committed
display errors with node-gyp and space in path - nodejs/node-gyp/issues/65
1 parent e161acf commit 985fac8

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/electron/main.js

+13-1
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,22 @@ class ElectronApp
173173
}
174174
catch (e)
175175
{
176+
result.exception = String(e);
176177
result.error = true;
177-
result.stderr += e;
178+
result.stderr += e + e.stderr;
179+
if (e.script && e.script.includes("gyp")) result.nativeCompile = true;
178180
}
179181
process.off("output", logToVariable);
182+
if (result.exception && result.exception === "Error: command failed")
183+
{
184+
if (result.nativeCompile)
185+
{
186+
if (targetDir.includes(" "))
187+
{
188+
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...";
189+
}
190+
}
191+
}
180192
return result;
181193
}
182194

0 commit comments

Comments
 (0)