Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #75 from mhfan/for-pr
Browse files Browse the repository at this point in the history
fix some non-sense code
  • Loading branch information
mrxiaozhuox authored Oct 24, 2022
2 parents 6ae68a9 + 029c0b2 commit 3bac1ac
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,6 @@ pub fn build_desktop(config: &CrateConfig, is_serve: bool) -> Result<()> {
}

if output.status.success() {
// this code will clean the output dir.
// if using the serve, we will not clean the out_dir.
if config.out_dir.is_dir() && !is_serve {
remove_dir_all(&config.out_dir)?;
}

let release_type = match config.release {
true => "release",
false => "debug",
Expand Down
2 changes: 1 addition & 1 deletion src/cli/serve/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl Serve {
if cfg!(windows) {
file.set_extension("exe");
}
Command::new(crate_config.out_dir.join(file).to_str().unwrap())
Command::new(file.to_str().unwrap())
.stdout(Stdio::inherit())
.output()?;
}
Expand Down

0 comments on commit 3bac1ac

Please sign in to comment.