Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove: breaking changes avoidance #234

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions src/handlers/install_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,24 +229,6 @@ async fn handle_rollback(config: &Config) -> Result<()> {
fs::remove_dir_all(oldest_path).await?;
}

// 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
Loading