I am trying out the new 0.4 release of Gutenberg and I am running into a crash. This is on Windows 10 Pro 64 bit, with the exe downloaded from the GitHub releases page.
Steps to reproduce:
gutenberg servecontent/_index.md (or any other file that will trigger rebuild).
Change detected @ 2018-08-04 20:47:19
thread 'main' panicked at 'internal error: entered unreachable code: Got a change in an unexpected path: content/_index.md', src\cmd\serve.rs:339:9
note: Run withRUST_BACKTRACE=1` for a backtrace.Thanks for the report. Looks like a Windows-only issue in https://github.com/Keats/gutenberg/blob/master/src/cmd/serve.rs#L323-L342 because line 326 is replacing \ into "" for some reason. Should be trivial to fix, I'll have a look later unless wants to do it
Seeing exactly the same thing on FreeBSD.
Stuffed a debug println in there which confirmed my suspicion:
detect_change_kind(): pwd: "/home/freaky/code/www/hur.st", path: content/_index.md
You're expecting path to be absolute when it's relative.
So much for my theory :(
Can you try the PR above @Freaky ?
After editing config.toml:
Change detected @ 2018-08-05 00:08:58
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: StripPrefixError(())', libcore/result.rs:945:5
Offending line:
partial_path.push(path.strip_prefix(pwd).unwrap());
Breaks because path is relative. It probably wants to be unwrap_or(path).
Here's my patch, for reference: https://github.com/Freaky/gutenberg/commit/f6a9d650fa995a0d4295a70e3d13b7dac0ae14ca
A more substantive change like @johansigfrids probably is called for - paths should only ever be &str/String for display purposes, not for processing.
I tried zola on windows. Still this issue is appearing.
Change detected @ 2019-03-29 19:07:13
thread 'main' panicked at 'internal error: entered unreachable code: Got a change in an unexpected path: C:\Users\akash.chandra.gurava\Documents\Projects\akashchandra\akashchandra\templates/index.html', src\cmd\serve.rs:489:9
With 0.6?
C:\Users\akash.chandra.gurava\Documents\Projects\akashchandra\akashchandra\templates/index.html
Looking at the path it does look like it's another case of \ vs /
https://github.com/getzola/zola/issues/649 has been created to track it