You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When maintaining official rustup docs, I have noticed that mdbook serve will work at first but fail immediately after a file update, which can break my workflow quite often:
> mdbook serve ./doc/user-guide --open
2023-10-30 17:17:41 [INFO] (mdbook::book): Book building has started
2023-10-30 17:17:41 [INFO] (mdbook::book): Running the html backend
2023-10-30 17:17:41 [INFO] (mdbook::cmd::serve): Serving on: http://localhost:3000
2023-10-30 17:17:41 [INFO] (mdbook): Opening web browser
2023-10-30 17:17:41 [INFO] (warp::server): Server::run; addr=[::1]:3000
2023-10-30 17:17:41 [INFO] (warp::server): listening on http://[::1]:3000
2023-10-30 17:17:41 [INFO] (mdbook::cmd::watch): Listening for changes...
2023-10-30 17:21:24 [ERROR] (mdbook::cmd::serve): Unable to serve: panicked at 'path is expected to be under the root', /Users/brew/Library/Caches/Homebrew/cargo_cache/registry/src/index.crates.io-6f17d22bba15001f/ignore-0.4.20/src/gitignore.rs:227:9
Steps
git clone https://github.com/rust-lang/rustup.git && cd rustup
mdbook serve ./doc/user-guide --open
Change anything under ./doc/user-guide and observe the panic
Possible Solution(s)
I'm not sure what this error message is about, but .matched_path_or_any_parents(path, path.is_dir()) requires path to be absolute. Maybe at some point down the business logic we need to canonicalize the path so it can appear to "be under the root":
Problem
When maintaining official
rustup
docs, I have noticed thatmdbook serve
will work at first but fail immediately after a file update, which can break my workflow quite often:Steps
git clone https://github.com/rust-lang/rustup.git && cd rustup
mdbook serve ./doc/user-guide --open
./doc/user-guide
and observe the panicPossible Solution(s)
I'm not sure what this error message is about, but
.matched_path_or_any_parents(path, path.is_dir())
requirespath
to be absolute. Maybe at some point down the business logic we need to canonicalize the path so it can appear to "be under the root":mdBook/src/cmd/watch.rs
Lines 89 to 99 in 94e0a44
Notes
No response
Version
The text was updated successfully, but these errors were encountered: