Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
fix: redirect errors, even if the error log already existed
Browse files Browse the repository at this point in the history
  • Loading branch information
wglanzer committed Nov 2, 2022
1 parent 48c5e69 commit ceecbe2
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,11 @@ public Process execute(@NotNull INodeJSEnvironment pEnv, @NotNull INodeJSExecBas
// redirect error stream to prevent randomly blocking ui...
// I dont know exactly why this fix works, but .. hey, it works
File err_log = new File(Places.getUserDirectory(), "var/log/npm_err.log");
if (!err_log.exists())
if (err_log.createNewFile())
builder = builder.redirectError(err_log);

//noinspection ResultOfMethodCallIgnored
err_log.createNewFile();

builder = builder.redirectError(err_log);

return builder.start();
}
Expand Down

0 comments on commit ceecbe2

Please sign in to comment.