Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: hide wrangler banner in secret list --format=json #8103

Merged
merged 8 commits into from
Feb 11, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/wrangler/src/secret/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { requireAuth } from "../user";
import { getLegacyScriptName } from "../utils/getLegacyScriptName";
import { isLegacyEnv } from "../utils/isLegacyEnv";
import { readFromStdin, trimTrailingWhitespace } from "../utils/std";
import { printWranglerBanner } from "../wrangler-banner";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer needed

import type { Config } from "../config";
import type { WorkerMetadataBinding } from "../deployment-bundle/create-worker-upload-form";

Expand Down Expand Up @@ -342,7 +343,13 @@ export const secretListCommand = createCommand({
hidden: true,
},
},
behaviour: {
printBanner: false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

printBanner can be a function that decides whether to print based on the args— printBanner: (args) => args.format === "pretty",

},
async handler(args, { config }) {
if (args.format === "pretty") {
await printWranglerBanner();
}
if (config.pages_build_output_dir) {
throw new UserError(
"It looks like you've run a Workers-specific command in a Pages project.\n" +
Expand Down
Loading