Skip to content

Commit

Permalink
rollback: Path issue
Browse files Browse the repository at this point in the history
  • Loading branch information
oissevalt committed Dec 7, 2023
1 parent 635a6c2 commit 11cc350
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ fn run_command(path: impl AsRef<Path>) {
);

std::thread::sleep(std::time::Duration::from_secs(2));
let err = Command::new(path.as_ref().join(SEAL_EXE))
let err = Command::new(Path::new("./").join(SEAL_EXE))
.current_dir(path)
.exec();
eprintln!("\n{}\n", format!("出现错误: {}", err).red());
Expand All @@ -116,7 +116,12 @@ fn run_command(path: impl AsRef<Path>) {
std::thread::sleep(std::time::Duration::from_secs(2));
if let Err(err) = Command::new("cmd")
.current_dir(path)
.args(["/C", "start", "", path.as_ref().join(SEAL_EXE)])
.args([
"/C",
"start",
"",
&Path::new("./").join(SEAL_EXE).to_string_lossy(),
])
.spawn()
{
eprintln!("\n{}\n", format!("出现错误: {}", err).red());
Expand Down

0 comments on commit 11cc350

Please sign in to comment.