chore(storage): do not read/write to user file when updating in maintainer mode

This commit is contained in:
Quentin McGaw
2025-11-17 15:29:41 +00:00
parent 2cf4d6b469
commit 6e99ca573e
3 changed files with 13 additions and 5 deletions

View File

@@ -81,7 +81,11 @@ func (c *CLI) Update(ctx context.Context, args []string, logger UpdaterLogger) e
return fmt.Errorf("options validation failed: %w", err)
}
storage, err := storage.New(logger, constants.ServersData)
serversDataPath := constants.ServersData
if maintainerMode {
serversDataPath = ""
}
storage, err := storage.New(logger, serversDataPath)
if err != nil {
return fmt.Errorf("creating servers storage: %w", err)
}