From 291fedc913145d3d25f2007cc1cf52d6580f7984 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 4 Sep 2024 09:49:19 +0200 Subject: [PATCH] Allow edit subcommand to create files. Signed-off-by: Felix Fontein --- cmd/sops/main.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/cmd/sops/main.go b/cmd/sops/main.go index 4195f522a..5b1050e45 100644 --- a/cmd/sops/main.go +++ b/cmd/sops/main.go @@ -1202,9 +1202,6 @@ func main() { if err != nil { return toExitError(err) } - if _, err := os.Stat(fileName); os.IsNotExist(err) { - return common.NewExitError(fmt.Sprintf("Error: cannot operate on non-existent file %q", fileName), codes.NoFileSpecified) - } inputStore := inputStore(c, fileName) outputStore := outputStore(c, fileName)