This repository was archived by the owner on Sep 23, 2025. It is now read-only.
Commit 4db97ca
authored
Fix shadowed trustedroot (#178)
* Fix shadowed variable bug
This code caused the singleton `trustedRoot` to be returned as nil on subsequent calls. The singleton was shadowed when the variable was redeclared in the `if` block.
Signed-off-by: Cody Soyland <codysoyland@github.com>
* Remove unused singleton
`singletonRootError` was never returned without being overwritten, so it was essentially unused. I think it's wise to always retry the TUF call on future invocations in case of network errors.
Signed-off-by: Cody Soyland <codysoyland@github.com>
---------
Signed-off-by: Cody Soyland <codysoyland@github.com>1 parent 4d0a2d6 commit 4db97ca
1 file changed
Lines changed: 7 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
300 | 299 | | |
301 | 300 | | |
302 | 301 | | |
| |||
311 | 310 | | |
312 | 311 | | |
313 | 312 | | |
314 | | - | |
315 | | - | |
| 313 | + | |
316 | 314 | | |
317 | 315 | | |
318 | 316 | | |
319 | 317 | | |
320 | | - | |
321 | | - | |
| 318 | + | |
322 | 319 | | |
323 | | - | |
| 320 | + | |
324 | 321 | | |
325 | | - | |
326 | | - | |
| 322 | + | |
327 | 323 | | |
328 | 324 | | |
329 | 325 | | |
| |||
0 commit comments