Skip to content

Commit

Permalink
Clean up pre-install command (#2632)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDarthShoe committed Jun 22, 2023
1 parent 9545813 commit f2d8174
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion agent/provider/src/cli/pre_install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ fn check_cert_perm(data_dir: &DataDir) -> anyhow::Result<()> {
.get_or_create()?
.join("cert-dir/cert-permissions.json");
if cert_perm_dir.exists() && cert_perm_dir.is_file() {
let bytes = std::fs::read(cert_perm_dir)?;
let bytes = std::fs::read(&cert_perm_dir)?;
if bytes != DEFAULT_CONTENTS {
println!("Warning: User-modified cert-permissions were detected.");
println!(" They are now superseded by outbound rules.");
println!(" Please migrate your permissions to outbound rules manually.");
println!(" Currently the file contains:");
println!("{}", std::str::from_utf8(&bytes)?);
} else {
std::fs::remove_file(&cert_perm_dir)?;
}
}

Expand Down

0 comments on commit f2d8174

Please sign in to comment.