Open plaidfinch opened 4 months ago
@plaidfinch can you confirm whether or not this behaviour occurs in rage 0.10.0
or with the current state of the main
branch? AFAICT I fixed this issue in 0.10.0 with 5d44f14761b4a5c22464bc23b1232e72467be455 (merged in #454).
What were you trying to do
When using
rage
withagenix-rekey
, an incorrect..
in a path in the Nix store meant thatrage
(called internally byagenix edit
) could not find the specified identity file. In this case, the following error was returned:By comparison, the original go implementation made the error easy to diagnose, because it reports what path it tried to load:
This immediately allowed me to understand what I'd done wrong.
Suggestion
When
rage
tries to read a file, perhaps it should wrap the error with a context (perhaps usinganyhow
oreyre
?) that gives the filename in question. This primarily aids in usability whenrage
is called by a script or inside another tool, because when used alone on the command line it is usually obvious which file cannot be found, but in situations like the above, it would be very useful.