zola: Auto reload not working on windows
Bug Report
Environment
Zola version: 0.6.0 (windows/powershell)
Expected Behavior
Running zola serve
and then making a change to a file will cause the server to reload the files without any problems on macos. Making the same change when running the same site on windows will cause the server to exit with an error.
Current Behavior
This exception is thrown:
Change detected @ 2019-03-29 11:07:54
thread 'main' panicked at 'internal error: entered unreachable code: Got a change in an unexpected path: C:\Users\Kenji\Projects\TestSite\content/_index.md', src\cmd\serve.rs:489:9
stack backtrace:
0: <unknown>
1: <unknown>
2: <unknown>
3: <unknown>
4: <unknown>
5: <unknown>
6: <unknown>
7: <unknown>
8: <unknown>
9: onig_unicode_define_user_property
10: BaseThreadInitThunk
11: RtlUserThreadStart
(The mix of backslashes and forward slashes in the “unexpected path” looks really fishy to me)
Step to reproduce
Run zola serve
on windows in the powershell. If you make any change to a file an exception will be thrown.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 4
- Comments: 20 (2 by maintainers)
Commits related to this issue
- Fix for issue #649 - Windows auto reload not working — committed to ericharding/zola by ericharding 5 years ago
Update notifications seem to be working in
next
. It looks like the -b option was removed innext
so I didn’t test that.I’ll revert & publish this Saturday unless it is fixed, the Windows version has already been broken for too long
Dammit
\
/
If anyone on Windows want to debug/fix that, it should be fairly easy, seems that the issue is really in cmd/serve.rs where the match is expecting paths with
/
. Not entirely sure how that issue slipped by though.