IntersectMBO / IntersectMBO/cardano-keys
[BUG] - `renderFileError` shows the file path twice for `FileIOError`
- Dominant language
- Haskell
- Stars
- 0
- Forks
- 0
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 4
Description
Reported by @jasagredo.
When a file cannot be read, the rendered `FileIOError` message contains the path twice:
```
blah.json: blah.json: withBinaryFile: does not exist (No such file or directory)
```
Expected, with the path once:
```
blah.json: withBinaryFile: does not exist (No such file or directory)
```
To reproduce, render the error from any reader in `Cardano.Keys.IO` (added in #4) on a file that does not exist:
```haskell
Left err <- readFileTextEnvelope "blah.json"
:: IO (Either (FileError TextEnvelopeError) (SigningKey KesKey))
Text.putStrLn $ docToText $ renderFileError renderTextEnvelopeError err
```
Contributor guide
Assessment
This issue has not been assessed yet.