Skip to content

Commit

Permalink
fix: org:config:monitor doesn't show any feedback (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
y-lakhdar authored Aug 4, 2021
1 parent 20322fa commit 51f10bb
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/cli/src/commands/org/config/monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ export default class Monitor extends Command {

@Preconditions(IsAuthenticated())
public async run() {
const snapshot = await this.getSnapshot();
this.printHeader();

this.printHeader(snapshot.id);
const snapshot = await this.getSnapshot();

await this.monitorSnapshot(snapshot);
this.config.runHook('analytics', buildAnalyticsSuccessHook(this, flags));
Expand Down Expand Up @@ -76,11 +76,14 @@ export default class Monitor extends Command {
cli.action.stop(this.getReportStatus(snapshot.latestReport));
}

private printHeader(snapshotId: string) {
private printHeader() {
const {args} = this.parse(Monitor);
const snapshotId = args.snapshotId;
const header = ReportViewerStyles.header(
`\nMonitoring snapshot ${snapshotId}:`
`Monitoring snapshot ${snapshotId}`
);
cli.log(header);
cli.log('');
cli.action.start(header);
}

private prettyPrint(str: string): string {
Expand Down

0 comments on commit 51f10bb

Please sign in to comment.