diff --git a/CHANGELOG.md b/CHANGELOG.md index 78a4ce1..e97048d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# v0.4.6 + +* Pass missing host to serve background command + # v0.4.5 * Update release process on github actions diff --git a/src/commands/serve.rs b/src/commands/serve.rs index d2d5f06..618c9a4 100644 --- a/src/commands/serve.rs +++ b/src/commands/serve.rs @@ -264,6 +264,11 @@ fn serve_background(args: &ArgMatches) -> ExitCode { cmd.arg("--passthru").arg(passthru); } + let host = args.get_one::("host").map(|s| s.as_str()).unwrap_or("").to_string(); + if host != "" { + cmd.arg("--host").arg(host); + } + let subprocess = cmd.spawn().expect("Failed to start server as a background process"); let pid = subprocess.id();