Skip to content

Commit

Permalink
style: remove redundant import and collapse else if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Dillon Lees committed Jul 16, 2020
1 parent d48b967 commit 21b518b
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use crossterm::{
terminal::{Clear, ClearType},
Output,
};
use dirs;
use flate2::read::GzDecoder;
use indicatif::{ProgressBar, ProgressStyle};
use log::*;
Expand Down Expand Up @@ -243,14 +242,12 @@ fn set_active(version: &str) -> Result<(), failure::Error> {
fs::remove_file(&tiller_sym_path)?;
}
fs::hard_link(tiller_path, tiller_sym_path)?;
} else {
if version.contains("v2") {
warn!(
"Unable to set active tiller {}. The executable does not exist at {}",
version,
tiller_path.to_str().unwrap()
);
}
} else if version.contains("v2") {
warn!(
"Unable to set active tiller {}. The executable does not exist at {}",
version,
tiller_path.to_str().unwrap()
);
}

Ok(())
Expand Down

0 comments on commit 21b518b

Please sign in to comment.