Skip to content

Commit

Permalink
fix: cross-platform build
Browse files Browse the repository at this point in the history
  • Loading branch information
jianxingxuejian committed Nov 24, 2022
1 parent 1f8650e commit a9e77ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src-tauri/src/cmd/system.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
use std::error::Error;
use std::os::windows::process::CommandExt;
use std::process::{Command, Output};

#[cfg(target_os = "windows")]
use std::os::windows::process::CommandExt;

#[cfg(target_os = "windows")]
pub fn run_program(path: String) -> Result<String, Box<dyn Error>> {
let index = path.rfind("/").ok_or("path fail")?;
Expand Down

0 comments on commit a9e77ab

Please sign in to comment.