Skip to content

Commit

Permalink
dawdawd
Browse files Browse the repository at this point in the history
  • Loading branch information
MordechaiHadad committed Aug 23, 2024
1 parent 079b77a commit e179f0c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/handlers/install_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ pub async fn start(
None => print_commits(client, &local_nightly, upstream_nightly).await?,
_ => (),
}

}

let downloaded_archive = match version.version_type {
Expand Down Expand Up @@ -217,7 +216,6 @@ async fn handle_rollback(config: &Config) -> Result<()> {
return Ok(());
}


let rollback_limit = config.rollback_limit.unwrap_or(3);

if rollback_limit == 0 {
Expand All @@ -231,9 +229,6 @@ async fn handle_rollback(config: &Config) -> Result<()> {
fs::remove_dir_all(oldest_path).await?;
}


println!("hello i am here");

// handle this for older installations of nightly instead of introducing breaking changes
cfg_if::cfg_if! {
if #[cfg(unix)] {
Expand All @@ -245,8 +240,8 @@ async fn handle_rollback(config: &Config) -> Result<()> {
let octal_perms = format!("{:o}", perms.mode());

if octal_perms == "100111" {
perms.set_mode(0o551);
fs::set_permissions(file, perms).await?;
perms.set_mode(0o551);
fs::set_permissions(file, perms).await?;
}

}
Expand All @@ -262,6 +257,7 @@ async fn handle_rollback(config: &Config) -> Result<()> {
.take(7)
.collect();

println!("hello i am here");
info!("Creating rollback: nightly-{id}");
filesystem::copy_dir_async("nightly", format!("nightly-{id}")).await?;

Expand Down

0 comments on commit e179f0c

Please sign in to comment.