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 using the mdbook serve command with --port 0 and --open options, the opened page is wrong, as the port is 0 instead of the random port attributed by the system.
Steps
mdbook init abc --force
mdbook serve abc --port 0 --open
Possible Solution(s)
The serving_url should contain the bound port instead of the asked port (0)
Maybe using something like bind_ephemeral could be used. It would maybe require to move the creation of the warp server in a separate function run before the thread spawn.
Problem
When using the
mdbook serve
command with--port 0
and--open
options, the opened page is wrong, as the port is0
instead of the random port attributed by the system.Steps
mdbook init abc --force
mdbook serve abc --port 0 --open
Possible Solution(s)
The
serving_url
should contain the bound port instead of the asked port (0)mdBook/src/cmd/serve.rs
Line 92 in 3a8faba
Maybe using something like
bind_ephemeral
could be used. It would maybe require to move the creation of the warp server in a separate function run before the thread spawn.mdBook/src/cmd/serve.rs
Lines 88 to 90 in 3a8faba
Notes
No response
Version
The text was updated successfully, but these errors were encountered: