Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
int128 committed Sep 24, 2024
1 parent 3e8624d commit b58e6d4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/tokencache/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ func (r *Repository) Lock(tokenCacheDir string, key tokencache.Key) (io.Closer,
if err != nil {
return nil, fmt.Errorf("could not compute the key: %w", err)
}
// Do not lock the token cache file.
// https://github.com/int128/kubelogin/issues/1144
lockFilepath := filepath.Join(tokenCacheDir, keyDigest+".lock")
lockFile := flock.New(lockFilepath)
if err := lockFile.Lock(); err != nil {
Expand Down

0 comments on commit b58e6d4

Please sign in to comment.