Commit a965390
fix: preserve HAB_AUTH_TOKEN through sudo and fix Windows hab PATH
Linux/macOS: `sudo hab pkg install` was dropping the HAB_AUTH_TOKEN
environment variable because sudo does not preserve env vars by default.
The token was correctly set via `export`, but the hab process running
under sudo never received it, resulting in 401 Unauthorized from Builder.
Fix: use `sudo -E` to preserve the environment across all three
`sudo hab pkg install` invocations (Linux download, Linux build install,
macOS download).
Windows: hab binary was installed to C:\ProgramData\Habitat but that
directory was never added to GITHUB_PATH in the Configure Habitat step,
causing subsequent steps to fail with 'hab is not recognized'.
Fix: add C:\ProgramData\Habitat to GITHUB_PATH.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Nitin Mathur <nmathur@progress.com>1 parent 5649cae commit a965390
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| 299 | + | |
299 | 300 | | |
300 | 301 | | |
301 | 302 | | |
| |||
582 | 583 | | |
583 | 584 | | |
584 | 585 | | |
585 | | - | |
| 586 | + | |
586 | 587 | | |
587 | 588 | | |
588 | 589 | | |
| |||
0 commit comments