Add a flag for skipping system upgrades (fixes #53)
This commit is contained in:
@@ -64,6 +64,11 @@ fn run() -> Result<(), Error> {
|
||||
.short("t")
|
||||
.long("tmux"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("no_system")
|
||||
.help("Don't perform system upgrade")
|
||||
.long("no-system"),
|
||||
)
|
||||
.get_matches();
|
||||
|
||||
if matches.is_present("tmux") && env::var("TMUX").is_err() {
|
||||
@@ -91,6 +96,7 @@ fn run() -> Result<(), Error> {
|
||||
}
|
||||
}
|
||||
|
||||
if !(matches.is_present("no_system")) {
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
terminal.print_separator("System update");
|
||||
@@ -124,6 +130,7 @@ fn run() -> Result<(), Error> {
|
||||
windows::run_chocolatey(&choco).report("Chocolatey", &mut reports);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
git_repos.insert(base_dirs.home_dir().join(".emacs.d"));
|
||||
git_repos.insert(base_dirs.home_dir().join(".vim"));
|
||||
@@ -263,9 +270,11 @@ fn run() -> Result<(), Error> {
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
if !(matches.is_present("no_system")) {
|
||||
terminal.print_separator("App Store");
|
||||
macos::upgrade_macos().report("App Store", &mut reports);
|
||||
}
|
||||
}
|
||||
|
||||
if !reports.is_empty() {
|
||||
terminal.print_separator("Summary");
|
||||
|
||||
Reference in New Issue
Block a user