Commit af3bb34
deepshekhardas
fix(cli): respect --profile flag by deferring default evaluation
The CommonCommandOptions Zod schema used .default(readAuthConfigCurrentProfileName())
which evaluates the default profile at module load time. When a user passes
--profile <name>, the Zod schema already has the default value set and ignores
the CLI argument.
Changed to .optional().transform(v => v ?? readAuthConfigCurrentProfileName())
so the fallback is evaluated lazily at parse time, only when no --profile
flag is provided.
Fixes #25421 parent e1f8134 commit af3bb34
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
0 commit comments