We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56bc16d commit e337936Copy full SHA for e337936
packages/cloudflare/src/cli/utils/run-wrangler.ts
@@ -12,6 +12,16 @@ type WranglerOptions = {
12
logging?: "all" | "error";
13
};
14
15
+/**
16
+ * Prepends CLI flags with `--` so that certain package managers can pass args through to wrangler
17
+ * properly.
18
+ *
19
+ * npm and yarn require `--` to be used, while pnpm and bun require that it is not used.
20
21
+ * @param options Build options.
22
+ * @param args CLI args.
23
+ * @returns Arguments with a passthrough flag injected when needed.
24
+ */
25
function injectPassthroughFlagForArgs(options: BuildOptions, args: string[]) {
26
if (options.packager !== "npm" && options.packager !== "yarn") {
27
return args;
0 commit comments