Skip to content

Output path not validated before the run #2147

@mre

Description

@mre

It's frustrating to see all checks run, only to find out that the final output file can't be written to.

~ ❯❯❯ lychee --output /does/not/exist https://endler.dev -v                                                                                                                                                               
[EXCLUDED] https://twitter.com/matthiasendler (at 9:12262)
   [200] https://endler.dev/about (at 9:9705) | Redirect: Followed 1 redirect resolving to the final status of: OK. Redirects: https://endler.dev/about --[308]--> https://endler.dev/about/
   [200] https://endler.dev/about (at 9:9983) | Redirect: Followed 2 redirects resolving to the final status of: OK. Redirects: https://endler.dev/about --[308]--> https://endler.dev/about/ --[308]--> https://endler.dev/about/
   [200] https://endler.dev/about (at 9:10305) | Redirect: Followed 2 redirects resolving to the final status of: OK. Redirects: https://endler.dev/about --[308]--> https://endler.dev/about/ --[308]--> https://endler.dev/about/
   [200] https://endler.dev/archive (at 9:10395) | Redirect: Followed 1 redirect resolving to the final status of: OK. Redirects: https://endler.dev/archive --[308]--> https://endler.dev/archive/
Error: Cannot write status output to file

Caused by:
    No such file or directory (os error 2)
~ ❯❯❯

I think we should show an error message immediately if we detect that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions