From fcd04e92564a2845608c39999dfa0e91ebebca29 Mon Sep 17 00:00:00 2001 From: Antoine Stevan <44101798+amtoine@users.noreply.github.com> Date: Sun, 28 Jan 2024 16:45:58 +0100 Subject: [PATCH] Revert "remove the destination only if it exists (#62)" (#66) related to - https://github.com/nushell/nupm/pull/62 - https://github.com/nushell/nushell/pull/11656 ## Description this commit reverts https://github.com/nushell/nupm/pull/62 because it was just a bug introduced recently and now fixed in https://github.com/nushell/nushell/pull/11656. --- .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 {