Skip to content

Commit

Permalink
🩹 [Patch]: Add error handling to script block execution in LogGroup (
Browse files Browse the repository at this point in the history
…#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
  • Loading branch information
MariusStorhaug authored Dec 14, 2024
1 parent 2bc08e7 commit 76807b9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/functions/public/Commands/Set-GitHubLogGroup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
)

Start-GitHubLogGroup -Name $Name
. $ScriptBlock
try {
. $ScriptBlock
} catch {
throw $_
}
Stop-GitHubLogGroup
}

0 comments on commit 76807b9

Please sign in to comment.