зеркало из https://github.com/getsops/sops.git
* update 'updatekeys' subcommand to use config (if exists) from commandline * Fix #671: `updatekeys` checks for config file flag The 'updatekeys' subcommand did not check for the config flag in the command line. Add that check and if found use it to set configPath. * Fix #671: `updatekeys` checks for config file flag The 'updatekeys' subcommand did not check for the config global string flag. Add that check and if found use it to set configPath. * Fix #671: `updatekeys` checks for config file flag The 'updatekeys' subcommand did not check for the config global string flag. Add that check and if found use it to set configPath. Edit: Remove mistake file addition * Update cmd/sops/main.go Co-authored-by: Adrian Utrilla <adrianutrilla@gmail.com>
This commit is contained in:
Родитель
99adfaed0b
Коммит
a7b6c5577f
|
@ -474,9 +474,15 @@ func main() {
|
|||
},
|
||||
}, keyserviceFlags...),
|
||||
Action: func(c *cli.Context) error {
|
||||
configPath, err := config.FindConfigFile(".")
|
||||
if err != nil {
|
||||
return common.NewExitError(err, codes.ErrorGeneric)
|
||||
var err error
|
||||
var configPath string
|
||||
if c.GlobalString("config") != "" {
|
||||
configPath = c.GlobalString("config")
|
||||
} else {
|
||||
configPath, err = config.FindConfigFile(".")
|
||||
if err != nil {
|
||||
return common.NewExitError(err, codes.ErrorGeneric)
|
||||
}
|
||||
}
|
||||
if c.NArg() < 1 {
|
||||
return common.NewExitError("Error: no file specified", codes.NoFileSpecified)
|
||||
|
|
Загрузка…
Ссылка в новой задаче