From 7468a22fdb4f404aa08a379b67a44673306e10b4 Mon Sep 17 00:00:00 2001 From: Nick Wesselman <27013789+nickwesselman@users.noreply.github.com> Date: Fri, 5 Dec 2025 19:30:32 -0500 Subject: [PATCH 1/2] `app bulk execute` should require `--watch` when using `--output-file` * Requires removing the default flag value for `--watch` --- packages/app/src/cli/commands/app/bulk/execute.ts | 2 +- packages/app/src/cli/flags.ts | 4 ++-- packages/cli/oclif.manifest.json | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/app/src/cli/commands/app/bulk/execute.ts b/packages/app/src/cli/commands/app/bulk/execute.ts index 07e0ed00e4..d54f2d287d 100644 --- a/packages/app/src/cli/commands/app/bulk/execute.ts +++ b/packages/app/src/cli/commands/app/bulk/execute.ts @@ -29,7 +29,7 @@ export default class BulkExecute extends AppLinkedCommand { query, variables: flags.variables, variableFile: flags['variable-file'], - watch: flags.watch, + watch: flags.watch ?? false, outputFile: flags['output-file'], ...(flags.version && {version: flags.version}), }) diff --git a/packages/app/src/cli/flags.ts b/packages/app/src/cli/flags.ts index 85b5969174..231ba0efae 100644 --- a/packages/app/src/cli/flags.ts +++ b/packages/app/src/cli/flags.ts @@ -64,13 +64,13 @@ export const bulkOperationFlags = { parse: async (input) => normalizeStoreFqdn(input), }), watch: Flags.boolean({ - description: 'Wait for bulk operation results before exiting.', + description: 'Wait for bulk operation results before exiting. Defaults to false.', env: 'SHOPIFY_FLAG_WATCH', - default: false, }), 'output-file': Flags.string({ description: 'The file path where results should be written. If not specified, results will be written to STDOUT.', env: 'SHOPIFY_FLAG_OUTPUT_FILE', + dependsOn: ['watch'], }), version: Flags.string({ description: 'The API version to use for the bulk operation. If not specified, uses the latest stable version.', diff --git a/packages/cli/oclif.manifest.json b/packages/cli/oclif.manifest.json index da5f1d81b8..7755066ce6 100644 --- a/packages/cli/oclif.manifest.json +++ b/packages/cli/oclif.manifest.json @@ -125,6 +125,9 @@ "type": "boolean" }, "output-file": { + "dependsOn": [ + "watch" + ], "description": "The file path where results should be written. If not specified, results will be written to STDOUT.", "env": "SHOPIFY_FLAG_OUTPUT_FILE", "hasDynamicHelp": false, @@ -212,7 +215,7 @@ }, "watch": { "allowNo": false, - "description": "Wait for bulk operation results before exiting.", + "description": "Wait for bulk operation results before exiting. Defaults to false.", "env": "SHOPIFY_FLAG_WATCH", "name": "watch", "type": "boolean" From 31337c0c33d7285c6c242361f8ce9e9ba4a8b393 Mon Sep 17 00:00:00 2001 From: Nick Wesselman <27013789+nickwesselman@users.noreply.github.com> Date: Fri, 5 Dec 2025 19:33:24 -0500 Subject: [PATCH 2/2] clarify dependency in description --- packages/app/src/cli/flags.ts | 3 ++- packages/cli/oclif.manifest.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/app/src/cli/flags.ts b/packages/app/src/cli/flags.ts index 231ba0efae..e9561dada8 100644 --- a/packages/app/src/cli/flags.ts +++ b/packages/app/src/cli/flags.ts @@ -68,7 +68,8 @@ export const bulkOperationFlags = { env: 'SHOPIFY_FLAG_WATCH', }), 'output-file': Flags.string({ - description: 'The file path where results should be written. If not specified, results will be written to STDOUT.', + description: + 'The file path where results should be written if --watch is specified. If not specified, results will be written to STDOUT.', env: 'SHOPIFY_FLAG_OUTPUT_FILE', dependsOn: ['watch'], }), diff --git a/packages/cli/oclif.manifest.json b/packages/cli/oclif.manifest.json index 7755066ce6..160ddd015c 100644 --- a/packages/cli/oclif.manifest.json +++ b/packages/cli/oclif.manifest.json @@ -128,7 +128,7 @@ "dependsOn": [ "watch" ], - "description": "The file path where results should be written. If not specified, results will be written to STDOUT.", + "description": "The file path where results should be written if --watch is specified. If not specified, results will be written to STDOUT.", "env": "SHOPIFY_FLAG_OUTPUT_FILE", "hasDynamicHelp": false, "multiple": false,