From 31fcde556516196a474ead02a8085b04a7dffef7 Mon Sep 17 00:00:00 2001 From: Parth Suthar Date: Mon, 12 Jun 2023 11:19:36 -0400 Subject: [PATCH] [fix] terminate command when headless flag is present --- src/commands/diff/index.ts | 1 + src/commands/targeting/get.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/commands/diff/index.ts b/src/commands/diff/index.ts index 6fba09e91..410ad858e 100644 --- a/src/commands/diff/index.ts +++ b/src/commands/diff/index.ts @@ -87,6 +87,7 @@ export default class Diff extends Base { if (!flags.file && !args['diff-pattern']) { this.writer.showError('Must provide a diff pattern') + return } this.useMarkdown = flags.format.includes('markdown') diff --git a/src/commands/targeting/get.ts b/src/commands/targeting/get.ts index c86502bc2..45249568a 100644 --- a/src/commands/targeting/get.ts +++ b/src/commands/targeting/get.ts @@ -31,6 +31,7 @@ export default class DetailedTargeting extends Base { if (flags.headless && !feature) { this.writer.showError('In headless mode, the feature is required') + return } if (feature) {