getzola / zola

A fast static site generator in a single binary with everything built-in. https://www.getzola.org
https://www.getzola.org
MIT License
14k stars 964 forks source link

Terminating `zola serve` on Windows prints `Encountered an error` #2628

Open myfonj opened 2 months ago

myfonj commented 2 months ago

Bug Report

When Ctr+C-ing a zola serve session that detected at least one change during run, most of the times prints extra error message.

// Does not prevent regular usage; been told to create this issue in #2551#issuecomment-2297227134

Environment

Expected Behavior

Clean exit without extra "error" prints, presumably.

Current Behavior

Most of the times there is printed either

Encountered an error: uncategorized error
Enable a logger to see more information.

or just

Encountered an error:

depending on terminal emulator used. Getting the first one with CMDer (ConEmu) the later with direct PS or CMD. (Doing set RUST_BACKTRACE=1 before run has no effect on the outcome for me.)

Step to reproduce

zola init
n,n,n,n
zola serve

make some change, like

echo foo >> templates\index.html

in other term, and then ctrl+c in the first one.

Tremoneck commented 1 week ago

I got the same error with the prebuilt zola version. The release build with v0.19.2 checkout out on my own machine works.

Keats commented 1 week ago

That's weird...