From 06c3bb433ac2b83ecda67f6c44e51f6902b263e9 Mon Sep 17 00:00:00 2001 From: Carrie Roberts Date: Thu, 5 Sep 2019 17:37:48 -0600 Subject: [PATCH] fix null error when using -Cleanup and -ShowDetails (#555) --- .../Invoke-AtomicRedTeam/Public/Invoke-AtomicTest.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/execution-frameworks/Invoke-AtomicRedTeam/Invoke-AtomicRedTeam/Public/Invoke-AtomicTest.ps1 b/execution-frameworks/Invoke-AtomicRedTeam/Invoke-AtomicRedTeam/Public/Invoke-AtomicTest.ps1 index fcf427c3..fd247596 100644 --- a/execution-frameworks/Invoke-AtomicRedTeam/Invoke-AtomicRedTeam/Public/Invoke-AtomicTest.ps1 +++ b/execution-frameworks/Invoke-AtomicRedTeam/Invoke-AtomicRedTeam/Public/Invoke-AtomicTest.ps1 @@ -209,7 +209,7 @@ function Invoke-AtomicTest { Write-Debug -Message 'Getting executor and build command script' - if ($ShowDetails) { + if ($ShowDetails -and ($null -ne $finalCommand)) { Write-Information -MessageData $finalCommand -Tags 'Command' } else {