mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-02-20 01:28:45 +01:00
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
16 lines
339 B
Go
16 lines
339 B
Go
//go:build !windows
|
|
|
|
package localconfig
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
func getFilePermission(fi os.FileInfo) error {
|
|
if fi.Mode().Perm() == 0o600 || fi.Mode().Perm() == 0o400 {
|
|
return nil
|
|
}
|
|
return fmt.Errorf("config file has incorrect permission flags %s, change the file permission either to 0400 or 0600", fi.Mode().Perm().String())
|
|
}
|