Skip to content

Commit 6b1aaee

Browse files
committed
switch from open to opener
By default, `opener` launches the subprocess without waiting for its completion, compared to `open` which waits for its completion. This is helpful in case the `watch` feature is enabled and one of the following commands `watch | serve --open` is used. If this command would open the browser, listening for changes would be blocked by the browser.
1 parent 601ebc5 commit 6b1aaee

File tree

3 files changed

+24
-13
lines changed

3 files changed

+24
-13
lines changed

Cargo.lock

+22-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ handlebars = "4.0"
2424
lazy_static = "1.0"
2525
log = "0.4"
2626
memchr = "2.0"
27-
open = "2.0"
27+
opener = "0.5"
2828
pulldown-cmark = "0.7.0"
2929
regex = "1.0.0"
3030
serde = "1.0"

src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ fn get_book_dir(args: &ArgMatches) -> PathBuf {
133133

134134
fn open<P: AsRef<OsStr>>(path: P) {
135135
info!("Opening web browser");
136-
if let Err(e) = open::that(path) {
136+
if let Err(e) = opener::open(path) {
137137
error!("Error opening web browser: {}", e);
138138
}
139139
}

0 commit comments

Comments
 (0)