From 1b273a280e1f81b09e61b075628402f51b5bf346 Mon Sep 17 00:00:00 2001 From: Aaron Jensen Date: Fri, 22 Nov 2019 11:33:05 -0800 Subject: [PATCH] Build not failing when an error occurs. --- Whiskey/Functions/Resolve-WhiskeyPowerShellModule.ps1 | 2 ++ Whiskey/Tasks/GetPowerShellModule.ps1 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Whiskey/Functions/Resolve-WhiskeyPowerShellModule.ps1 b/Whiskey/Functions/Resolve-WhiskeyPowerShellModule.ps1 index acc0814d..a11690cc 100644 --- a/Whiskey/Functions/Resolve-WhiskeyPowerShellModule.ps1 +++ b/Whiskey/Functions/Resolve-WhiskeyPowerShellModule.ps1 @@ -44,6 +44,8 @@ function Resolve-WhiskeyPowerShellModule Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -SessionState $ExecutionContext.SessionState + Write-WhiskeyVerbose -Message ('Resolve-WhiskeyPowerShellModule ErrorActionPreference {0}' -f $ErrorActionPreference) -Verbose + $modulesRoot = Join-Path -Path $BuildRoot -ChildPath $powerShellModulesDirectoryName if( $Path ) { diff --git a/Whiskey/Tasks/GetPowerShellModule.ps1 b/Whiskey/Tasks/GetPowerShellModule.ps1 index 96eb3d16..e06d0484 100644 --- a/Whiskey/Tasks/GetPowerShellModule.ps1 +++ b/Whiskey/Tasks/GetPowerShellModule.ps1 @@ -21,6 +21,8 @@ function Get-WhiskeyPowerShellModule Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -SessionState $ExecutionContext.SessionState + Write-WhiskeyVerbose -Message ('GetPowerShellModule ErrorActionPreference {0}' -f $ErrorActionPreference) -Verbose + if( -not $Name ) { Stop-WhiskeyTask -TaskContext $TaskContext -Message 'Property "Name" is mandatory. It should be set to the name of the PowerShell module you want installed.'