Skip to content
Snippets Groups Projects
Unverified Commit 0aa2565d authored by GyDi's avatar GyDi
Browse files

fix: spawn command

parent 22b11db1
No related branches found
No related tags found
No related merge requests found
...@@ -174,7 +174,7 @@ pub fn view_profile(index: usize, profiles_state: State<'_, ProfilesState>) -> R ...@@ -174,7 +174,7 @@ pub fn view_profile(index: usize, profiles_state: State<'_, ProfilesState>) -> R
// use vscode first // use vscode first
if let Ok(code) = which::which("code") { if let Ok(code) = which::which("code") {
return match Command::new(code).arg(path).status() { return match Command::new(code).arg(path).spawn() {
Ok(_) => Ok(()), Ok(_) => Ok(()),
Err(_) => Err("failed to open file by VScode".into()), Err(_) => Err("failed to open file by VScode".into()),
}; };
...@@ -182,7 +182,7 @@ pub fn view_profile(index: usize, profiles_state: State<'_, ProfilesState>) -> R ...@@ -182,7 +182,7 @@ pub fn view_profile(index: usize, profiles_state: State<'_, ProfilesState>) -> R
// use `open` command // use `open` command
if let Ok(open) = which::which("open") { if let Ok(open) = which::which("open") {
return match Command::new(open).arg(path).status() { return match Command::new(open).arg(path).spawn() {
Ok(_) => Ok(()), Ok(_) => Ok(()),
Err(_) => Err("failed to open file by `open`".into()), Err(_) => Err("failed to open file by `open`".into()),
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment