Passing arguments to CLI, when run from PowerShell, fails

I noticed when generating a password, the following works as expected:

❯ & bw.exe --response generate --length 20
{"success":true,"data":{"object":"string","data":"ertquAhahDA483yDUtxc"}}

But when doing this, it fails:

❯ $bwargs = @("--response", "generate", "--length 20")
❯ & bw.exe @bwargs
error: unknown option '--length 20'
❯ & bw.exe $bwargs
error: unknown option '--length 20'
❯ $bwargs = @("--response", "generate --length 20")
❯ & bw.exe $bwargs
Invalid command: generate --length 20
See --help for a list of available commands.

Same thing for generating a passphrase:

❯ & bw.exe --response generate --passphrase --words 5
{"success":true,"data":{"object":"string","data":"peddling-conjoined-slacked-pronto-cringing"}}
❯ $bwargs = @("--response", "generate", "--passphrase", "--words 5")
❯ & bw.exe $bwargs
error: unknown option '--words 5'

I am using PowerShell Core 7.3.2 on Windows 10 2H22. I also tested with Windows PowerShell 5.1, and I am getting the same errors.

So far, I have only seen this come up when using the generate option. Others seem to work fine.

Any idea what could be going on?

$bwargs = @(“–response”, “generate”, “–length”, “20”)

similarly

PS D:\temp\BW Exports> $bwargs = @(“–response”, “generate”, “–passphrase”, “–words”, “5”)
PS D:\temp\BW Exports> .\bw.exe $bwargs
{“success”:true,“data”:{“object”:“string”,“data”:“anaconda-joystick-hardiness-pluck-outrage”}}

Thank you. That works.