diff --git a/windows/install.ps1 b/windows/install.ps1 index 2bca337..95b829c 100644 --- a/windows/install.ps1 +++ b/windows/install.ps1 @@ -270,6 +270,10 @@ function Install-Mole { if (Test-Path $src) { try { if ((Get-Item $src).PSIsContainer) { + # For directories, remove destination first if exists to avoid nesting + if (Test-Path $dst) { + Remove-Item -Path $dst -Recurse -Force + } Copy-Item -Path $src -Destination $dst -Recurse -Force } else {