Skip to content

Commit

Permalink
clean cache after cli operations
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Dowding committed Jan 5, 2020
1 parent c03d37c commit ca03723
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/App.vala
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ public class App : Gtk.Application {
check_if_internet_is_active (true);
LinuxKernel.query (true);
LinuxKernel.print_list ();
LinuxKernel.clean_cache ();
exit (0);
break;

Expand All @@ -427,31 +428,36 @@ public class App : Gtk.Application {

case "--check":
print_updates ();
LinuxKernel.clean_cache ();
exit (0);
break;

case "--notify":
notify_user ();
LinuxKernel.clean_cache ();
exit (0);
break;

case "--install-latest":
check_if_admin ();
check_if_internet_is_active (true);
LinuxKernel.install_latest (false, true);
LinuxKernel.clean_cache ();
exit (0);
break;

case "--install-point":
check_if_admin ();
check_if_internet_is_active (true);
LinuxKernel.install_latest (true, true);
LinuxKernel.clean_cache ();
exit (0);
break;

case "--purge-old-kernels":
check_if_admin ();
LinuxKernel.purge_old_kernels (true);
LinuxKernel.clean_cache ();
exit (0);
break;

Expand Down Expand Up @@ -506,6 +512,7 @@ public class App : Gtk.Application {
exit (1);
}

LinuxKernel.clean_cache ();
return list[0].install (true);

case "--download":
Expand Down Expand Up @@ -548,6 +555,7 @@ public class App : Gtk.Application {
exit (1);
}

LinuxKernel.clean_cache ();
return LinuxKernel.download_kernels (list);

case "--remove":
Expand Down Expand Up @@ -588,6 +596,7 @@ public class App : Gtk.Application {
exit (1);
}

LinuxKernel.clean_cache ();
return LinuxKernel.remove_kernels (list);

default:
Expand Down

0 comments on commit ca03723

Please sign in to comment.