We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
(Low) Something is a little off
Let's say I have a command with one boolean parameter
const options = globalOptionsZod .extend({ enabled: zod.alias('e', z.boolean()) }) .strict();
When running the command without the parameter, CLI asks me to provide a value for the parameter
🌶️ Provide values for the following parameters: √ enabled: 1
But it doesn't accept any value like 0, 1, true, or false and it fails with the error
0
1
true
false
Error: enabled: Expected boolean, received string
Define zod schema with one boolean parameter for a command and try to run execute the command without the parameter.
CLI accepts provided value for missing parameter.
No response
v10.2.0
v20.8.1
Windows
PowerShell
The text was updated successfully, but these errors were encountered:
Ouch, thanks for bringing this up. Let's check our logic to find out what's wrong.
Sorry, something went wrong.
@MartinM85 are you btw looking at a specific command that this bug affects or is it a theoretical situation that you came across?
I found the bug while testing new command: #6519
Fixes providing value for required option. Closes pnp#6518
8351ef2
waldekmastykarz
Successfully merging a pull request may close this issue.
Priority
(Low) Something is a little off
Description
Let's say I have a command with one boolean parameter
When running the command without the parameter, CLI asks me to provide a value for the parameter
But it doesn't accept any value like
0
,1
,true
, orfalse
and it fails with the errorSteps to reproduce
Define zod schema with one boolean parameter for a command and try to run execute the command without the parameter.
Expected results
CLI accepts provided value for missing parameter.
Actual results
Diagnostics
No response
CLI for Microsoft 365 version
v10.2.0
nodejs version
v20.8.1
Operating system (environment)
Windows
Shell
PowerShell
cli doctor
No response
Additional Info
No response
The text was updated successfully, but these errors were encountered: