aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/packages/chocolatey/tools/chocolateybeforemodify.ps1
blob: 61886e2315c463705363b1f3e105740dc2ceca3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
write-host "Attempting to stop any running bazel processes, to allow upgrade"
try
{
  $running = get-process bazel
}
catch
{
  write-host "No running bazel processes to stop"
  $running = @()
}

if ($running)
{
  write-host "Stopping bazel processes"
  foreach($p in $running)
  {
    stop-process $p
    write-verbose "Stopped $($p.ProcessName) $($p.Id)"
  }
}