Skip to content

Commit

Permalink
refactor: specify missing file in error message
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
t3hmrman committed Sep 19, 2024
1 parent e7a1b11 commit 7fde193
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/sops/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ func main() {
return toExitError(err)
}
if _, err := os.Stat(fileName); os.IsNotExist(err) {
return common.NewExitError("Error: cannot operate on non-existent file", codes.NoFileSpecified)
return common.NewExitError(fmt.Sprintf("Error: cannot operate on non-existent file [%s]", fileName), codes.NoFileSpecified)
}

inputStore := inputStore(c, fileName)
Expand Down

0 comments on commit 7fde193

Please sign in to comment.