Skip to content

Commit

Permalink
ignore "Picked up" java stderr messages
Browse files Browse the repository at this point in the history
solves #19
solves #384
  • Loading branch information
elad-eyal committed Apr 12, 2021
1 parent 2e6864d commit 0c8e529
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/plantuml/renders/processWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ export function processWrapper(process: child_process.ChildProcess, pipeFilePath
stdout = Buffer.from(pipeFilePath);
}
let stderr = Buffer.concat(buffErr, buffErrLen).toString();
if (stderr.indexOf('JAVA_TOOL_OPTIONS') >= 0) stderr = "";

// If environment variables such as JAVA_TOOL_OPTIONS or _JAVA_OPTIONS are set,
// some java implementations will echo them on stderr.
stderr.replace(/^Picked up .*$/mg, "");

if (stderr) {
reject(<RenderError>{ error: stderr, out: stdout });
return;
Expand Down

0 comments on commit 0c8e529

Please sign in to comment.