Copilot
Copilot
> @copilot tests are failing, fix them Fixed in commit 0e501be. Updated the fallback tests to reflect the reversed protocol ordering - tests now correctly expect Snap to be tried...
@andrzejnovak I've opened a new pull request, #659, to work on those changes. Once the pull request is ready, I'll request review from you.
> @copilot there are more scenarios that need to be documented: > > 1. There is an exception to not use `throw , the exception is when a `[ValidateScript()]` on...
> @copilot In the example shows how a state-changing command is using `$PSCmdlet.ThrowTerminatingError()`, is there a possible solution for where a user does not need to pass `-ErrorAction 'Stop'` when...
> @copilot You say to use Write-Error for public commands unless the command is specifically designed to always fail on errors like assert-style commands. But let say we have this...
> @copilot You found that "The -ErrorAction 'Stop' parameter on the Assert call alone is insufficient because ThrowTerminatingError doesn't propagate as a script-terminating error to the caller.", have ... The...
> @copilot Let say we have this scenarion: > > 1. We invoke Set-Property (without using ErrorAction parameter)... **YES, the scenario works as expected!** With `Write-Error` in `Assert-ElevatedUser`, using `-ErrorAction...
> @copilot Igonre if there would be breaking changes Understood. Documentation updated in commit 586fd94e to remove assert-style commands from acceptable uses of `$PSCmdlet.ThrowTerminatingError()`. **Changes:** - Assert-style commands now recommended...
> @copilot I want you to verify that this scenarion actually works - stops execution with terminating error, take note where and how `ErrorAction` parameter is used. If it works...
> @copilot I think we can: > > 1. Remove the section `##### .NET Method Exceptions`, it feels like a duplicate wha we already have in the section `##### Exception...