Commit 1a7858a
Fix environment variable handling for Unix platforms in DockerBuild.ps1.
On Unix (Linux/macOS), Windows-specific environment variables like $env:USERPROFILE and $env:LOCALAPPDATA don't exist, causing null parameter errors.
Fixed:
- New-EnvJson function: Use $env:HOME instead of $env:USERPROFILE for NuGet packages path on Unix
- New-ClaudeEnvJson function: Use $env:HOME instead of $env:USERPROFILE for NuGet packages path on Unix
- Claude mode: Use $env:HOME instead of $env:USERPROFILE for hostUserProfile on Unix
All paths now properly detect platform and use appropriate environment variables:
- Windows: $env:USERPROFILE, $env:LOCALAPPDATA
- Unix: $env:HOME
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 2431824 commit 1a7858a
File tree
2 files changed
+34
-6
lines changed- src/PostSharp.Engineering.BuildTools/Resources
2 files changed
+34
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
100 | 107 | | |
101 | 108 | | |
102 | 109 | | |
| |||
204 | 211 | | |
205 | 212 | | |
206 | 213 | | |
207 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
208 | 222 | | |
209 | 223 | | |
210 | 224 | | |
| |||
1080 | 1094 | | |
1081 | 1095 | | |
1082 | 1096 | | |
1083 | | - | |
| 1097 | + | |
1084 | 1098 | | |
1085 | 1099 | | |
1086 | 1100 | | |
| |||
Lines changed: 17 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
100 | 107 | | |
101 | 108 | | |
102 | 109 | | |
| |||
204 | 211 | | |
205 | 212 | | |
206 | 213 | | |
207 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
208 | 222 | | |
209 | 223 | | |
210 | 224 | | |
| |||
1080 | 1094 | | |
1081 | 1095 | | |
1082 | 1096 | | |
1083 | | - | |
| 1097 | + | |
1084 | 1098 | | |
1085 | 1099 | | |
1086 | 1100 | | |
| |||
0 commit comments