Skip to content

Commit 0df445b

Browse files
authored
Return $pscmdlet.shouldprocess in .net test wrapper
1 parent e184e3b commit 0df445b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tests/Engine/LibraryUsage.tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function Invoke-ScriptAnalyzer {
7878
);
7979

8080
if ($PSCmdlet.ParameterSetName -eq "File") {
81-
$supportsShouldProcessFunc = [Func[string, string, bool]]{ return $true }
81+
$supportsShouldProcessFunc = [Func[string, string, bool]]{ return $PSCmdlet.Shouldprocess }
8282
if ($Fix.IsPresent)
8383
{
8484
return $scriptAnalyzer.AnalyzeAndFixPath($Path, $supportsShouldProcessFunc, $Recurse.IsPresent);

0 commit comments

Comments
 (0)