MarkBind / markbind

MarkBind is a tool for generating content-heavy websites from source files in Markdown format
https://markbind.org/
MIT License
135 stars 124 forks source link

UncaughtException when running Markbind Serve in non-Markbind directories. #2570

Open gerteck opened 3 weeks ago

gerteck commented 3 weeks ago

Please confirm that you have searched existing issues in the repo

Yes, I have searched the existing issues

Any related issues?

1715

Tell us about your environment

Win 10

MarkBind version

3.1.1 - 5.5.2

Describe the bug and the steps to reproduce it

When markbind serve is run in stray directories (non-MarkBind configured folders), there is an uncaught exception that should be caught, or at least not shown to the user, to avoid confusion. (unless this is intentional).

The "path" argument must be of type string.

v3.1.1: image

v5.5.2: image

Minor nit to improve CLI experience.

Expected behavior

Error not shown.

Anything else?

No response

kaixin-hc commented 3 weeks ago

Sounds like this error might be related to #2547 and #1825

tlylt commented 1 week ago

Yes, I think https://github.com/MarkBind/markbind/issues/1825 is relevant to this issue. I guess it is a known behavior that markbind serve does not work in non-markbind directories, but improving the error handling/message is indeed good to have.