Skip to content

Commit

Permalink
fix: show waiting message only if watch is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar committed Apr 25, 2021
1 parent 56acafd commit a63a32a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions codeview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,13 @@ const codeview = new Command<void>()
}

let infoMessage = "Initializing codeview....";
const waitingMessage = "Waiting for file system changes...";
const url = `http://${options.host}:${options.port}`;
const spinner: Spinner | null = options.spinner
? wait(infoMessage).start()
: null;
const sig = Deno.signals.interrupt();
const processes: Set<Deno.Process | Deno.File> = new Set();
const waitingMessage = "Waiting for file system changes...";
let webview: Webview | null = null;
let server: Server | null = null;
let cleanConfirmed = false;
Expand All @@ -223,7 +223,9 @@ const codeview = new Command<void>()

await generate().finally(() => {
clearInterval(loadingMessageInterval);
logInfo(waitingMessage);
options.watch
? logInfo(waitingMessage)
: logInfo("Successfully generated coverage report");
webview?.eval(`window.location.href = "${url}"`);
});

Expand Down

0 comments on commit a63a32a

Please sign in to comment.