Skip to content

Commit

Permalink
fix(pkg/client/tokenservice): fix token handling on windows
Browse files Browse the repository at this point in the history
Signed-off-by: Michele Meloni <[email protected]>
  • Loading branch information
mmeloni authored and jeroiraz committed May 3, 2022
1 parent 3fb6bd9 commit e10415d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/client/tokenservice/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"errors"
"io/ioutil"
"os"
"path"
"path/filepath"
"strings"
"sync"
)
Expand Down Expand Up @@ -55,7 +55,7 @@ func (ts *file) SetToken(database string, token string) error {
if token == "" {
return ErrEmptyTokenProvided
}
if err := os.MkdirAll(path.Dir(ts.tokenAbsPath), os.ModePerm); err != nil {
if err := os.MkdirAll(filepath.Dir(ts.tokenAbsPath), os.ModePerm); err != nil {
return err
}
return ioutil.WriteFile(ts.tokenAbsPath, BuildToken(database, token), 0644)
Expand Down

0 comments on commit e10415d

Please sign in to comment.