Skip to content

Commit ea67db2

Browse files
author
Steve McGill
committed
Sets ErrorActionPreference to Stop
There are a few areas of the script which assume the previous lines have worked, without asserting that that's true. ErrorActionPreference ensures that the script stops as soon as there is an error, which makes it easier to debug what's happening as the errors become steadily more misleading the further down the script it gets.
1 parent a92782b commit ea67db2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Create-SitecoreModule-DockerAssetImage.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ param(
3030
[switch] $GenerateCdContentDirectory
3131
)
3232

33+
$ErrorActionPreference = "Stop"
34+
3335
#---------------------------------[Read configuration]------------------------------------------------
3436
$configurationPath = "configuration.json"
3537
$jsonConfiguration = Get-Content -Path $configurationPath | ConvertFrom-Json

0 commit comments

Comments
 (0)