Skip to content

Minor fixes to PSScript resource#1558

Open
SteveL-MSFT wants to merge 1 commit into
PowerShell:mainfrom
SteveL-MSFT:ai-fixes
Open

Minor fixes to PSScript resource#1558
SteveL-MSFT wants to merge 1 commit into
PowerShell:mainfrom
SteveL-MSFT:ai-fixes

Conversation

@SteveL-MSFT
Copy link
Copy Markdown
Member

PR Summary

Minor issues found by AI

  • removed comment since it's out of date and not really providing value
  • add Write-TraceQueue before exit in failed case so accumulated traces get written

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes small reliability/cleanup adjustments to the PSScript resource wrapper, primarily aimed at ensuring trace output isn’t lost when script execution fails.

Changes:

  • Flushes the trace queue before exiting when the invoked script enters a Failed invocation state.
  • Removes an outdated inline comment about non-terminating errors.

Comment on lines 156 to 158
Write-DscTrace -Now -Level Error -Message $message
Write-TraceQueue
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants