We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5220b43 commit 42c4d70Copy full SHA for 42c4d70
2 files changed
foo
src/PesterExtensions/Public/Mock-EnvironmentVariable.ps1
@@ -20,7 +20,7 @@ function Mock-EnvironmentVariable {
20
}
21
22
else {
23
- New-Item -Path $EnvironmentVariable -Value $Value
+ New-Item -Path $EnvironmentVariable -Value $Value | Out-Null
24
25
try {
26
Invoke-Command -ScriptBlock $Fixture
@@ -29,7 +29,7 @@ function Mock-EnvironmentVariable {
29
catch {
30
throw $_
31
32
-
+
33
finally {
34
if ($OriginalValue) {
35
Set-Item -Path $EnvironmentVariable -Value $OriginalValue
0 commit comments