1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 14:26:46 +00:00

fix(windows): fix install script directory copy to prevent nesting

- Remove existing directories before copying to prevent nested folder structures (e.g., bin/bin)
- This fixes 'Unknown command' errors after installation
This commit is contained in:
Bhadra
2026-01-08 19:59:51 +05:30
parent 7b03fceaf8
commit 34affd75c4

View File

@@ -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 {