chore(deps) Update Rust crate open to v2 (#2306)

* chore(deps) Update Rust crate open to v2

* fix build

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
This commit is contained in:
renovate[bot]
2021-08-08 20:28:26 -03:00
committed by GitHub
parent ecef9946e7
commit a6d231df48
2 changed files with 3 additions and 14 deletions

View File

@@ -63,7 +63,7 @@ notify-rust = { version = "4.5", optional = true }
reqwest = { version = "0.11", features = [ "json", "multipart" ], optional = true }
bytes = { version = "1", features = [ "serde" ], optional = true }
attohttpc = { version = "0.17", features = [ "json", "form" ] }
open = { version = "1.7", optional = true }
open = { version = "2.0", optional = true }
shared_child = { version = "0.3", optional = true }
os_pipe = { version = "0.9", optional = true }
rfd = "0.4.1"

View File

@@ -10,18 +10,7 @@ pub fn open(path: String, with: Option<String>) -> crate::api::Result<()> {
} else {
open::that(&path)
};
match exit_status {
Ok(status) => {
if status.success() {
Ok(())
} else {
Err(crate::api::Error::Shell("open command failed".into()))
}
}
Err(err) => Err(crate::api::Error::Shell(format!(
"failed to open: {}",
err.to_string()
))),
}
exit_status
.map_err(|err| crate::api::Error::Shell(format!("failed to open: {}", err.to_string())))
}
}