Skip to content

Commit eb6df89

Browse files
committed
better handle opening links with no active browser
1 parent c32e335 commit eb6df89

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "leth"
3-
version = "0.4.0"
3+
version = "0.4.1"
44
authors = ["fcd <femnad@users.noreply.github.com>"]
55
edition = "2018"
66

src/main.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ extern crate structopt;
55
use std::collections::HashMap;
66
use std::io::Cursor;
77
use std::io::{self, Read};
8-
use std::process::Command;
8+
use std::process::{Command, Stdio};
99

1010
use regex::Regex;
1111
use skim::prelude::*;
@@ -62,7 +62,9 @@ pub fn main() {
6262
let url = item.clone();
6363
Command::new("firefox")
6464
.arg(url.output().as_ref())
65-
.output()
65+
.stdout(Stdio::null())
66+
.stderr(Stdio::null())
67+
.spawn()
6668
.unwrap();
6769
}
6870
}

0 commit comments

Comments
 (0)