Skip to content

Commit

Permalink
LETS FUCKING GOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO…
Browse files Browse the repository at this point in the history
…OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
  • Loading branch information
MordechaiHadad committed Aug 23, 2024
1 parent 704a9fa commit ec7be2f
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/handlers/install_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,25 +229,6 @@ async fn handle_rollback(config: &Config) -> Result<()> {
fs::remove_dir_all(oldest_path).await?;
}

println!("Is exist? {}", env::current_dir()?.join("nightly/bob.json").exists());
// handle this for older installations of nightly instead of introducing breaking changes
cfg_if::cfg_if! {
if #[cfg(unix)] {
use std::os::unix::prelude::PermissionsExt;

let platform = helpers::get_platform_name(&None);
let file = &format!("nightly/{platform}/bin/nvim");
let mut perms = fs::metadata(file).await?.permissions();
let octal_perms = format!("{:o}", perms.mode());

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

}
}

let nightly_file = fs::read_to_string("nightly/bob.json").await?;
let mut json_struct: UpstreamVersion = serde_json::from_str(&nightly_file)?;
let id: String = json_struct
Expand Down

0 comments on commit ec7be2f

Please sign in to comment.