Skip to content

Commit

Permalink
Pass missing host to serve background
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierstoval committed Dec 23, 2022
1 parent bae444e commit 2dbe82b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v0.4.6

* Pass missing host to serve background command

# v0.4.5

* Update release process on github actions
Expand Down
5 changes: 5 additions & 0 deletions src/commands/serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@ fn serve_background(args: &ArgMatches) -> ExitCode {
cmd.arg("--passthru").arg(passthru);
}

let host = args.get_one::<String>("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();
Expand Down

0 comments on commit 2dbe82b

Please sign in to comment.