Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/wdp.backup/wdp.backup.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@
}

Log $cfg.Messages.End

} catch {
Write-Error $_.Exception
exit 1
if($cfg.UseThrowLogic) {
throw $_.Exception
} else {
Write-Error $_.Exception
exit 1
}
}

}
Expand Down Expand Up @@ -135,7 +139,7 @@ function BuildParameters {
if($cfg.ProviderSettings) {
$parameters.SourceSettings = $cfg.ProviderSettings
}

if($cfg.SkipFolderList) {
$parameters.SkipFolderList = @($cfg.SkipFolderList)
}
Expand All @@ -158,6 +162,7 @@ $cfg = @{
PublishArtifacts = $false
ProviderSettings = $null
SkipFolderList = $null
UseThrowLogic = $false
SkipFileList = $null
Verbose = $true
Messages = @{
Expand Down
9 changes: 7 additions & 2 deletions src/wdp.deploy/wdp.deploy.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@
Log $cfg.Messages.End

} catch {
Write-Error $_.Exception
exit 1
if($cfg.UseThrowLogic -eq "True") {
throw $_.Exception
} else {
Write-Error $_.Exception
exit 1
}
}

}
Expand Down Expand Up @@ -165,6 +169,7 @@ $cfg = @{
ParametersFile = $null
UseSync = $true
Verbose = $true
UseThrowLogic = $false
Messages = @{
Begin = "deployment started..."
End = "deployment finished successfully"
Expand Down