Skip to content

Commit

Permalink
Merge pull request prasmussen#258 from saaros/dont-read-nonexistent-t…
Browse files Browse the repository at this point in the history
…okens

auth/file_source: don't try to read non-existent files
  • Loading branch information
prasmussen authored Feb 24, 2017
2 parents c7ad977 + 2aa4234 commit e14e24a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion auth/file_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func ReadFile(path string) ([]byte, bool, error) {
func ReadToken(path string) (*oauth2.Token, bool, error) {

content, exists, err := ReadFile(path)
if err != nil {
if err != nil || exists == false {
return nil, exists, err
}

Expand Down

0 comments on commit e14e24a

Please sign in to comment.