From f2cd3cd2cbbf2e3c656b43281c5cf49624184276 Mon Sep 17 00:00:00 2001 From: amtoine Date: Sun, 28 Jan 2024 16:37:52 +0100 Subject: [PATCH] Revert "remove the destination only if it exists (#62)" This reverts commit 8fcec7aabafaa0fc22646c1174da0dd3d863bd13. --- .github/workflows/ci.yml | 4 +--- nupm/install.nu | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a35146f..02a600e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,4 @@ jobs: run: version - name: Run the tests - run: | - nu --commands $"use ($env.PWD)/nupm/; nupm install --no-confirm --force --path ." - nu --commands $"use ($env.PWD)/nupm/; nupm test" + run: nu --commands $"use ($env.PWD)/nupm/; nupm test" diff --git a/nupm/install.nu b/nupm/install.nu index 0429500..b2e0f76 100644 --- a/nupm/install.nu +++ b/nupm/install.nu @@ -87,9 +87,7 @@ def install-path [ let destination = $module_dir | path join $package.name if $force { - if ($destination | path exists) { - rm --recursive --force $destination - } + rm --recursive --force $destination } if ($destination | path type) == dir {