mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
* fix: reduced config file permission restriction on windows Signed-off-by: Soumya Ghosh Dastidar <[email protected]> * fix: updated localconfig tests to check error Signed-off-by: Soumya Ghosh Dastidar <[email protected]>
17 lines
342 B
Go
17 lines
342 B
Go
//go:build windows
|
|
|
|
package localconfig
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
func getFilePermission(fi os.FileInfo) error {
|
|
if fi.Mode().Perm() == 0666 || fi.Mode().Perm() == 0444 {
|
|
return nil
|
|
}
|
|
return fmt.Errorf("config file has incorrect permission flags:%s."+
|
|
"change the file permission either to 0444 or 0666.", fi.Mode().Perm().String())
|
|
}
|