You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my best guess is by reassigning optionSchema to _def.innerType, we lose the special __parsel prefix of description, causing the config lookup to "fail".
getAlias() is the only config lookup from there on, so I suppose it supports that theory?
Potential fixes:
Move getAlias() before the reassignment
Store the original "raw" description value and pass that to getAlias()
I'm trying to define an alias for an option, but it's not working if used with neither
zod.default()
norzod.optional()
.Try it out: https://codesandbox.io/p/devbox/infallible-jones-ys358t?file=/string-default-alias/source/commands/index.tsx:6,1
Run
npm run build
(maybe followed bynpm link
) and thenda -h
.Works 👍
Outputs:
Doesn't work 👎
and
Outputs:
❭ sda -h Usage: sda [options] Options: --name [name] Name (default: 1) -v, --version Show version number -h, --help Show help
(default only in the first case, obviously)
The text was updated successfully, but these errors were encountered: