Skip to content

Commit 76807b9

Browse files
🩹 [Patch]: Add error handling to script block execution in LogGroup (#205)
## Description - Add error handling to script block execution in `LogGroup`. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent 2bc08e7 commit 76807b9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/functions/public/Commands/Set-GitHubLogGroup.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
)
4242

4343
Start-GitHubLogGroup -Name $Name
44-
. $ScriptBlock
44+
try {
45+
. $ScriptBlock
46+
} catch {
47+
throw $_
48+
}
4549
Stop-GitHubLogGroup
4650
}

0 commit comments

Comments
 (0)