Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mozillazg committed Dec 12, 2023
1 parent ca61c4c commit ef17c0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions pkg/ctl/common/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ func Yes(msg string) bool {
Message: msg,
}
_ = survey.AskOne(prompt, &promptRet)
if !promptRet {
return false
}
return true
return promptRet
}

func SetupClusterIdFlag(cmd *cobra.Command) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/ctl/rbac/binding/binding.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func SaveBindingToFile(ctx context.Context, dir string, b Binding, client kubern
}

if _, err := os.Stat(dir); os.IsNotExist(err) {
if err := os.MkdirAll(dir, 0755); err != nil {
if err := os.MkdirAll(dir, 0750); err != nil {
return "", fmt.Errorf("mkdir %s: %w", dir, err)
}
}
Expand All @@ -238,7 +238,7 @@ func SaveBindingToFile(ctx context.Context, dir string, b Binding, client kubern
if err != nil {
return "", err
}
if err := os.WriteFile(filePath, data, 0644); err != nil {
if err := os.WriteFile(filePath, data, 0600); err != nil {
return "", err
}
return filePath, nil
Expand Down

0 comments on commit ef17c0b

Please sign in to comment.