Prerequisites
Steps to reproduce
Invoke-WebRequest "https://example.com" -Method GET -OutFile ''
--> No error, no outfile
Invoke-WebRequest "https://example.com" -Method GET -OutFile ' '
--> Error
Same behaviour in PS5 and PS7
Expected behavior
Both or none should throw an error
Actual behavior
The two commands have different behaviours
Error details
No response
Environment data
Name Value
---- -----
PSVersion 7.3.2
PSEdition Core
GitCommitId 7.3.2
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response
Prerequisites
Steps to reproduce
Invoke-WebRequest "https://example.com" -Method GET -OutFile ''--> No error, no outfile
Invoke-WebRequest "https://example.com" -Method GET -OutFile ' '--> Error
Same behaviour in PS5 and PS7
Expected behavior
Both or none should throw an errorActual behavior
The two commands have different behavioursError details
No response
Environment data
Visuals
No response