Skip to content

Commit

Permalink
improve progression logs in fluentci upgrade command
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Jun 23, 2024
1 parent b22c4d1 commit 9580042
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/cmd/upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,22 @@ async function upgrade() {
"-f",
"-g",
],
stdin: "inherit",
stdout: "inherit",
stderr: "inherit",
});

const { stdout, stderr } = await command.output();
const { status } = await command.spawn();

console.log(new TextDecoder().decode(stdout));
console.log(new TextDecoder().decode(stderr));
if ((await status).success) {
console.log(
`${green(
"fluentci has been successfully upgraded to the latest version."
)}`
);
return;
}
Deno.exit(1);
}

export async function checkForUpdate(options: { checkUpdate: boolean }) {
Expand Down Expand Up @@ -74,7 +84,7 @@ export async function checkForUpdate(options: { checkUpdate: boolean }) {
}
} catch (e) {
console.log(`
${yellow("WARNING: ")} checking for udpate failed ${e}
${yellow("WARNING: ")} checking for update failed ${e}
`);
}
return false;
Expand Down

0 comments on commit 9580042

Please sign in to comment.