Skip to content

Commit

Permalink
Redundant kill all processes
Browse files Browse the repository at this point in the history
Being called before `ApplyReleasesImpl.FullUninstall`
  • Loading branch information
Layoric committed Apr 14, 2016
1 parent 81c50e4 commit d2ec7b4
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/Squirrel/UpdateManager.ApplyReleases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,6 @@ await squirrelAwareApps.ForEachAsync(async exe => {
} else {
allApps.ForEach(x => RemoveShortcutsForExecutable(x.Name, ShortcutLocation.StartMenu | ShortcutLocation.Desktop));
}

// NB: Some people attempt to uninstall apps while
// they're still running. I cannot even.
var toKill = allApps
.SelectMany(x => Process.GetProcessesByName(x.Name.Replace(".exe", "")))
.ToList();

if (toKill.Count > 0) {
toKill.ForEach(x => x.Kill());
Thread.Sleep(750);
}
} catch (Exception ex) {
this.Log().WarnException("Failed to run pre-uninstall hooks, uninstalling anyways", ex);
}
Expand Down

0 comments on commit d2ec7b4

Please sign in to comment.