Skip to content

Commit

Permalink
Merge pull request #1513 from tgodzik/fix-print
Browse files Browse the repository at this point in the history
improvement: Print Java all at once
  • Loading branch information
tgodzik authored May 29, 2024
2 parents cda40b5 + 159df6c commit f767021
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion packages/metals-languageclient/src/getJavaHome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ async function validateJavaVersion(
});

javaVersionOut.stderr?.on("data", (out: Buffer) => {
outputChannel.appendLine(`${javaBin} -version:`);
const msg = "\t" + out.toString().trim().split("\n").join("\n\t");
outputChannel.appendLine(msg);
});
Expand Down
6 changes: 3 additions & 3 deletions packages/metals-languageclient/src/setupCoursier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export async function setupCoursier(
output: OutputChannel
): Promise<{ coursier: string; javaHome: string }> {
const handleOutput = (out: Buffer) => {
const msg = out.toString().trim();
output.appendLine("Coursier: \n" + msg);
const msg = "\t" + out.toString().trim().split("\n").join("\n\t");
output.appendLine(msg);
};

const resolveCoursier = async () => {
Expand Down Expand Up @@ -82,7 +82,7 @@ export async function setupCoursier(

if (!javaHome && coursier) {
output.appendLine(
`No installed java with version ${javaVersion} found. Will fetch one using coursier.`
`No installed java with version ${javaVersion} found. Will fetch one using coursier:`
);
javaHome = await resolveJavaHomeWithCoursier(coursier);
}
Expand Down

0 comments on commit f767021

Please sign in to comment.