We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8296378 commit 61922eeCopy full SHA for 61922ee
1 file changed
cmd/sops/main.go
@@ -359,9 +359,15 @@ func main() {
359
if c.Bool("verbose") || c.GlobalBool("verbose") {
360
logging.SetLevel(logrus.DebugLevel)
361
}
362
- configPath, err := config.FindConfigFile(".")
363
- if err != nil {
364
- return common.NewExitError(err, codes.ErrorGeneric)
+ var configPath string
+ var err error
+ if c.GlobalString("config") != "" {
365
+ configPath = c.GlobalString("config")
366
+ } else {
367
+ configPath, err = config.FindConfigFile(".")
368
+ if err != nil {
369
+ return common.NewExitError(err, codes.ErrorGeneric)
370
+ }
371
372
if c.NArg() < 1 {
373
return common.NewExitError("Error: no file specified", codes.NoFileSpecified)
0 commit comments