IntersectMBO / IntersectMBO/cardano-keys

[BUG] - `renderFileError` shows the file path twice for `FileIOError`

Open
#7 0 comments 0 reactions 1 assignee Claimed by @palas View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.