mirror of
https://github.com/tw93/Mole.git
synced 2026-02-15 02:20:08 +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) {
|
if (Test-Path $src) {
|
||||||
try {
|
try {
|
||||||
if ((Get-Item $src).PSIsContainer) {
|
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
|
Copy-Item -Path $src -Destination $dst -Recurse -Force
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user