Skip to content

Commit

Permalink
fix(publish): use lighter crate for opening browser (denoland#22224)
Browse files Browse the repository at this point in the history
Alternative to denoland#22223 which
switches `webbrowser` crate to `open` (https://crates.io/crates/open)
which is lighterweight.
  • Loading branch information
bartlomieju committed Feb 1, 2024
1 parent ca11536 commit aba9149
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 131 deletions.
159 changes: 31 additions & 128 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ lsp-types.workspace = true
monch.workspace = true
notify.workspace = true
once_cell.workspace = true
open = "5.0.1"
os_pipe.workspace = true
percent-encoding.workspace = true
pin-project.workspace = true
Expand All @@ -133,7 +134,6 @@ typed-arena = "=2.0.1"
unicode-width = "0.1"
uuid = { workspace = true, features = ["serde"] }
walkdir = "=2.3.2"
webbrowser = "0.8.12"
zeromq = { version = "=0.3.4", default-features = false, features = ["tcp-transport", "tokio-runtime"] }
zstd.workspace = true

Expand Down
4 changes: 2 additions & 2 deletions cli/tools/registry/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ async fn get_auth_headers(

ring_bell();
println!("{}", colors::gray("Waiting..."));
let _ = webbrowser::open(&auth_url);
let _ = open::that_detached(&auth_url);

let interval = std::time::Duration::from_secs(auth.poll_interval);

Expand Down Expand Up @@ -415,7 +415,7 @@ async fn ensure_scopes_and_packages_exist(
colors::cyan_with_underline(&create_package_url)
);
println!("{}", colors::gray("Waiting..."));
let _ = webbrowser::open(&create_package_url);
let _ = open::that_detached(&create_package_url);

let package_api_url = api::get_package_api_url(
&registry_api_url,
Expand Down

0 comments on commit aba9149

Please sign in to comment.