PSProfiler icon indicating copy to clipboard operation
PSProfiler copied to clipboard

Ignores script parameter default value

Open kraai opened this issue 1 year ago • 0 comments

When I add the following code to foo.ps1 and run foo.ps1, it prints "foo". If I run Measure-Script -Path foo.ps1, it outputs nothing.

param(
    [string]$Foo = 'foo'
)

$Foo

I expect it to output the same thing in both cases. Is this the intended behavior?

kraai avatar Dec 17 '23 17:12 kraai