Commit 6ae4aba
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 build install, Linux download,
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: Nikita Mathur <nikita.mathur@progress.com>1 parent e79e265 commit 6ae4aba
1 file changed
+4
-3
lines changed| 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 | | |
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
| 301 | + | |
301 | 302 | | |
302 | 303 | | |
303 | 304 | | |
| |||
582 | 583 | | |
583 | 584 | | |
584 | 585 | | |
585 | | - | |
| 586 | + | |
586 | 587 | | |
587 | 588 | | |
588 | 589 | | |
| |||
0 commit comments