Self rename in Windows (fix #458) (#460)

This commit is contained in:
Roey Darwish Dror
2020-07-01 21:03:19 +03:00
committed by GitHub
parent 9c9c92796b
commit 3f80bee53a
4 changed files with 71 additions and 1 deletions

View File

@@ -6,6 +6,8 @@ mod execution_context;
mod executor;
mod report;
mod runner;
#[cfg(windows)]
mod self_renamer;
#[cfg(feature = "self-update")]
mod self_update;
mod steps;
@@ -92,6 +94,16 @@ fn run() -> Result<()> {
}
}
#[cfg(windows)]
let _self_rename = if config.self_rename() {
Some(crate::self_renamer::SelfRenamer::create()?)
} else {
None
};
let mut s = String::new();
std::io::stdin().read_line(&mut s)?;
if let Some(commands) = config.pre_commands() {
for (name, command) in commands {
generic::run_custom_command(&name, &command, &ctx)?;