summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/src/main.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/cli/src/main.rs b/cli/src/main.rs
index 1190232d..0ae87db5 100644
--- a/cli/src/main.rs
+++ b/cli/src/main.rs
@@ -348,13 +348,9 @@ fn print_diagnostics(
/// - The given viewer provided by `open` if it is `Some`.
fn open_file(open: Option<&str>, path: &Path) -> StrResult<()> {
if let Some(app) = open {
- open::with(path, app).map_err(|err| {
- format!("failed to open `{}` with `{}`, reason: {}", path.display(), app, err)
- })?;
+ open::with_in_background(path, app);
} else {
- open::that(path).map_err(|err| {
- format!("failed to open `{}`, reason: {}", path.display(), err)
- })?;
+ open::that_in_background(path);
}
Ok(())