From 0775f71549a578e592b195bc00765a287b42e703 Mon Sep 17 00:00:00 2001 From: Roms1383 Date: Thu, 1 Feb 2024 18:18:58 +0700 Subject: [PATCH] :hammer: improve swap command --- recipes/justfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/justfile b/recipes/justfile index 094118eb..0cffab33 100644 --- a/recipes/justfile +++ b/recipes/justfile @@ -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}}"; }