Commit 8099fe6
Add location save/restore to DockerBuild.ps1.
Wrap entire script in Push-Location/Pop-Location with try/finally block to ensure the current directory is restored when the script exits, even if an error occurs.
Changes:
- Add Push-Location before Set-Location $PSScriptRoot
- Wrap script body in try block
- Add finally block with Pop-Location at the end
This prevents the script from leaving the user in a different directory than where they started.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 0976154 commit 8099fe6
File tree
2 files changed
+24
-4
lines changed- src/PostSharp.Engineering.BuildTools/Resources
2 files changed
+24
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
66 | 70 | | |
67 | | - | |
| 71 | + | |
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| |||
1339 | 1343 | | |
1340 | 1344 | | |
1341 | 1345 | | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
66 | 70 | | |
67 | | - | |
| 71 | + | |
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| |||
1339 | 1343 | | |
1340 | 1344 | | |
1341 | 1345 | | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
0 commit comments