Skip to content

Bad CLI error output when outputting to nonexistent directory #205

Closed
@pe3

Description

@pe3

To repeat the problem

echo "hello" > test.md
cat test.md
marked test.md -o test.html
cat test.html
marked test.md -o nonexistent_dir/test.html

results in an error which makes you doubt the quality of marked

/usr/local/share/npm/lib/node_modules/marked/bin/marked:182
    if (err) throw err;
                   ^
Error: ENOENT, open 'nonexistent_dir/test.html'

compare it to mv test.md nonexistent_dir/test.md which results in:

mv: rename test.md to nonexistent_dir/test.md: No such file or directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    L2 - annoyingSimilar to L1 - broken but there is a known workaround available for the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions