Skip to content

Commit 8dff965

Browse files
authored
Disable TUF timestamping when TUF cache disabled (#470)
Signed-off-by: Cody Soyland <[email protected]>
1 parent bc5a79f commit 8dff965

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/tuf/client.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,10 @@ func (c *Client) Refresh() error {
150150
if err != nil {
151151
return fmt.Errorf("tuf refresh failed: %w", err)
152152
}
153-
153+
// If cache is disabled, we don't need to persist the last timestamp
154+
if c.cfg.DisableLocalCache {
155+
return nil
156+
}
154157
// Update config with last update
155158
cfg, err := LoadConfig(c.configPath())
156159
if err != nil {

0 commit comments

Comments
 (0)