Skip to content

Commit

Permalink
🔨 improve swap command
Browse files Browse the repository at this point in the history
  • Loading branch information
Roms1383 committed Feb 1, 2024
1 parent 0bd36fe commit 0775f71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions recipes/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ set dotenv-load

[windows]
@swap BACKUP CACHE:
if (Test-Path "{{BACKUP}}") { \
if (Test-Path "{{BACKUP}}" -PathType leaf) { \
Write-Host "replacing {{CACHE}} with {{BACKUP}}"; \
cp -Force "{{BACKUP}}' '{{CACHE}}"; \
just copy '{{BACKUP}}' '{{CACHE}}'; \
Remove-Item -Force -Path "{{BACKUP}}"; \
} else { Write-Host "missing {{BACKUP}}"; }

0 comments on commit 0775f71

Please sign in to comment.