Skip to content

Commit

Permalink
Patch download_ap.ps1
Browse files Browse the repository at this point in the history
Ensure re-install works by allowing script to remove hidden files on Linux

[skip ci]
  • Loading branch information
atruskie authored Aug 10, 2021
1 parent 4604e4e commit b10d054
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build/download_ap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@ function New-InstallDirectory {
if($Force -or $cmdlet.ShouldContinue("Deleting existing folder ``$Destination``?", $message)) {
# hardcoding because this script can be executed anonymously - in that case it doesn't have a name we can use
$script_name = "download_ap.ps1"
Get-ChildItem -Path "$Destination" -Exclude "$script_name","Logs" | Remove-Item -Recurse -ErrorAction Stop
# AT 2021: added -Force to cater for hidden files on linux (prefixed with a '.')
Get-ChildItem -Path "$Destination" -Exclude "$script_name","Logs" | Remove-Item -Recurse -Force -ErrorAction Stop
Start-Sleep 1
}
else {
Expand Down

0 comments on commit b10d054

Please sign in to comment.