Skip to content

Commit da9e634

Browse files
committed
Fixed pipelines get command, now consistent with others with --json arg
1 parent be5d2dd commit da9e634

File tree

1 file changed

+6
-6
lines changed
  • packages/wrangler/src/pipelines/cli

1 file changed

+6
-6
lines changed

packages/wrangler/src/pipelines/cli/get.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ export const pipelinesGetCommand = createCommand({
1818
describe: "The ID of the pipeline to retrieve",
1919
demandOption: true,
2020
},
21-
format: {
22-
choices: ["pretty", "json"],
23-
describe: "The output format for pipeline",
24-
default: "pretty",
21+
json: {
22+
describe: "Output in JSON format",
23+
type: "boolean",
24+
default: false,
2525
},
2626
},
2727
positionalArgs: ["pipeline"],
@@ -42,7 +42,7 @@ export const pipelinesGetCommand = createCommand({
4242
config,
4343
accountId,
4444
pipelineId,
45-
args.format as "pretty" | "json"
45+
args.json ? "json" : "pretty"
4646
);
4747

4848
if (foundInLegacy) {
@@ -52,7 +52,7 @@ export const pipelinesGetCommand = createCommand({
5252
throw error;
5353
}
5454

55-
if (args.format === "json") {
55+
if (args.json) {
5656
logger.json(pipeline);
5757
return;
5858
}

0 commit comments

Comments
 (0)