Skip to content

Commit

Permalink
Merge branch 'master' into feature/ci-test
Browse files Browse the repository at this point in the history
  • Loading branch information
MissterHao committed Nov 29, 2022
2 parents be70558 + c9d1091 commit a264930
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions src/application/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,22 +177,18 @@ impl<'a> App<'a> {

#[cfg(target_os = "linux")]
fn open_workspace(&mut self) {
match self.select_workspace() {
Some(workspace) => {
if workspace.location_type
== crate::domain::entity::workspace::WorkspaceLocation::Local
{
// Use cmd as program instead
// https://github.com/rust-lang/rust/issues/95957
Command::new("bash")
.arg("-c")
.arg("code")
.arg(workspace.strip_decode_path())
.spawn()
.expect("code command failed to start");
}
if let Some(workspace) = self.select_workspace() {
if workspace.location_type == crate::domain::entity::workspace::WorkspaceLocation::Local
{
// Use cmd as program instead
// https://github.com/rust-lang/rust/issues/95957
Command::new("bash")
.arg("-c")
.arg("code")
.arg(workspace.strip_decode_path())
.spawn()
.expect("code command failed to start");
}
None => {}
}
}

Expand Down

0 comments on commit a264930

Please sign in to comment.