This repository was archived by the owner on Sep 23, 2025. It is now read-only.
Commit c7514c9
committed
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 <[email protected]>
* 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 <[email protected]>
---------
Signed-off-by: Cody Soyland <[email protected]>1 parent 1ef452b commit c7514c9
1 file changed
+7
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
306 | 305 | | |
307 | 306 | | |
308 | 307 | | |
| |||
317 | 316 | | |
318 | 317 | | |
319 | 318 | | |
320 | | - | |
321 | | - | |
| 319 | + | |
322 | 320 | | |
323 | 321 | | |
324 | 322 | | |
325 | 323 | | |
326 | | - | |
327 | | - | |
| 324 | + | |
328 | 325 | | |
329 | | - | |
| 326 | + | |
330 | 327 | | |
331 | | - | |
332 | | - | |
| 328 | + | |
333 | 329 | | |
334 | 330 | | |
335 | 331 | | |
| |||
0 commit comments