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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user