Skip to content

Commit 7fde193

Browse files
committed
refactor: specify missing file in error message
This commit updates the error output by `sops` when failing to operate on a msising file to include the path to the file that was missing. Signed-off-by: vados <vados@vadosware.io>
1 parent e7a1b11 commit 7fde193

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/sops/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,7 @@ func main() {
12031203
return toExitError(err)
12041204
}
12051205
if _, err := os.Stat(fileName); os.IsNotExist(err) {
1206-
return common.NewExitError("Error: cannot operate on non-existent file", codes.NoFileSpecified)
1206+
return common.NewExitError(fmt.Sprintf("Error: cannot operate on non-existent file [%s]", fileName), codes.NoFileSpecified)
12071207
}
12081208

12091209
inputStore := inputStore(c, fileName)

0 commit comments

Comments
 (0)