We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d7ae427 commit dd2a0bbCopy full SHA for dd2a0bb
src/lib.rs
@@ -283,7 +283,12 @@ fn open_browser_internal(browser: Browser, url: &str) -> Result<ExitStatus> {
283
.or_else(|_| -> Result<ExitStatus> {
284
Command::new("kioclient").arg("exec").arg(url).status()
285
})
286
- .or_else(|_| -> Result<ExitStatus> { Command::new("x-www-browser").arg(url).status() }),
+ .or_else(|e| -> Result<ExitStatus> {
287
+ if let Ok(_child) = Command::new("x-www-browser").arg(url).spawn() {
288
+ return Ok(ExitStatusExt::from_raw(0));
289
+ }
290
+ Err(e)
291
+ }),
292
_ => Err(Error::new(
293
ErrorKind::NotFound,
294
"Only the default browser is supported on this platform right now",
0 commit comments