In certain environments, this will be reproduced by running the installer as usual and launching Pico - Developer PowerShell.
Sorry for the Japanese UI, but it says "The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name, a script block, or a CommandInfo object."

This indicates that $env:COMSPEC is not defined. In fact, echo $env:COMSPEC did not print anything. Of course, I did not intentionally erase it... perhaps.
The disappearance seems to be a common occurrence, as evidenced by reports of similar problems occurring in other projects (other 3rd party applications supposedly erasing it? I have not investigated further).
ref: ScoopInstaller/Scoop#3845
Anyway, $env:COMSPEC is just an environment variable, and since it can disappear or contain strange things, some people think it is wise to specify cmd.exe directly if we obviously know we will use it.
ref: ScoopInstaller/Scoop#4692
In certain environments, this will be reproduced by running the installer as usual and launching Pico - Developer PowerShell.
Sorry for the Japanese UI, but it says "The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name, a script block, or a CommandInfo object."
This indicates that
$env:COMSPECis not defined. In fact,echo $env:COMSPECdid not print anything. Of course, I did not intentionally erase it... perhaps.The disappearance seems to be a common occurrence, as evidenced by reports of similar problems occurring in other projects (other 3rd party applications supposedly erasing it? I have not investigated further).
ref: ScoopInstaller/Scoop#3845
Anyway,
$env:COMSPECis just an environment variable, and since it can disappear or contain strange things, some people think it is wise to specifycmd.exedirectly if we obviously know we will use it.ref: ScoopInstaller/Scoop#4692