Skip to content

Commit 7458c90

Browse files
committed
feat(volo-cli): auto run cargo fmt --all after generating codes
Signed-off-by: Yu Li <liyu.yukiteru@bytedance.com>
1 parent 24933af commit 7458c90

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

volo-cli/src/init.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use std::{fs::create_dir_all, path::PathBuf};
2+
use std::process::Command;
23

34
use clap::{value_parser, Parser};
45
use volo_build::{
@@ -273,6 +274,11 @@ impl CliCommand for Init {
273274
PathBuf::from("./volo-gen/").join(DEFAULT_CONFIG_FILE),
274275
)?;
275276

277+
let _ = Command::new("cargo")
278+
.arg("fmt")
279+
.arg("--all")
280+
.output()?;
281+
276282
Ok(())
277283
}
278284
}

0 commit comments

Comments
 (0)