Skip to content

Commit

Permalink
fix: sops file format not detected correctly (#28)
Browse files Browse the repository at this point in the history
fixes #27
  • Loading branch information
sanzoghenzo authored Aug 13, 2024
1 parent 834d64a commit 9c66c65
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions util/sops.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,15 @@ func DecryptFile(filepath string) (err error) {
return
}


func getFileFormat(filename string) string {
extension := filepath.Ext(filename)
if extension == "yaml" || extension == "yml"{
if extension == ".yaml" || extension == ".yml" {
return "yaml"
} else if extension == "json" {
} else if extension == ".json" {
return "json"
} else if extension == "ini" {
} else if extension == ".ini" {
return "ini"
} else {
return "binary"
}
}
}

0 comments on commit 9c66c65

Please sign in to comment.