Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
//!
//! ```
//! use webbrowser;
//!
//!
//! if webbrowser::open("http://github.com").is_ok() {
//! // ...
//! }
Expand Down Expand Up @@ -205,7 +205,7 @@ fn open_browser_internal(browser: Browser, url: &str) -> Result<Output> {
/// Open on Linux using the $BROWSER env var
#[cfg(target_os = "linux")]
fn open_on_linux_using_browser_env(url: &str) -> Result<Output> {
let browsers = env::var("BROWSER").map_err(|_| -> Error { Error::new(ErrorKind::NotFound, format!("BROWSER env not set")) })?;
let browsers = ::std::env::var("BROWSER").map_err(|_| -> Error { Error::new(ErrorKind::NotFound, format!("BROWSER env not set")) })?;
for browser in browsers.split(':') { // $BROWSER can contain ':' delimited options, each representing a potential browser command line
if !browser.is_empty() {
// each browser command can have %s to represent URL, while %c needs to be replaced
Expand Down