Commit a683b64
Correct the reason given for shim teardown by name
Copilot review flagged the comments as factually wrong, and it was half
right. Set-Item does accept 'function:global:X' - it creates X in the global
scope. The real problem is asymmetry: Remove-Item and Get-Item do not resolve
that same path back to the function, and fail silently instead of erroring,
so the teardown was a no-op.
Verified no 'global:' path form removes the function (function:global:X,
Function:global:X, Function:\global:X all leave it in place), so removing by
name is required. Behaviour is unchanged; only the explanation is corrected.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>1 parent c8d1ade commit a683b64
2 files changed
Lines changed: 8 additions & 4 deletions
File tree
- .github/actions
- Publish-PSModule/tests
- Release-PSModule/tests
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
0 commit comments