Skip to content

Commit

Permalink
Merge pull request #102 from AzureAD/stop-azureauth-before-install
Browse files Browse the repository at this point in the history
Wait after killing a task before removing the directory
  • Loading branch information
reillysiemens committed Jun 10, 2022
2 parents b2454e3 + 2cd38cf commit 4a2226a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions install/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ if ($ProcessCheck -ne $null)
{
Write-Verbose "Stopping any currently running azureauth instances"
taskkill /f /im azureauth.exe 2>&1 | Out-Null

# After killing the process it is still possible for there there to be locks on the files it was using (including
# its own DLLs). The OS may take an indeterminate amount of time to clean those up, but so far we've observed 1
# second to be enough.
Start-Sleep -Seconds 1
}

if (Test-Path -Path $extractedDirectory) {
Expand Down

0 comments on commit 4a2226a

Please sign in to comment.