Skip to content

Commit

Permalink
lxc/config: Don't create oidctokens directory unless there are toke…
Browse files Browse the repository at this point in the history
…ns to write.

Signed-off-by: Mark Laing <[email protected]>
  • Loading branch information
markylaing committed Feb 14, 2025
1 parent 305ff04 commit 80d592b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lxc/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ func (c *Config) OIDCTokenPath(remote string) string {

// SaveOIDCTokens saves OIDC tokens to disk.
func (c *Config) SaveOIDCTokens() {
if len(c.oidcTokens) == 0 {
return
}

tokenParentPath := c.ConfigPath("oidctokens")

if !shared.PathExists(tokenParentPath) {
Expand Down

0 comments on commit 80d592b

Please sign in to comment.