diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02a600e..a35146f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,4 +34,6 @@ jobs: run: version - name: Run the tests - run: nu --commands $"use ($env.PWD)/nupm/; nupm test" + run: | + nu --commands $"use ($env.PWD)/nupm/; nupm install --no-confirm --force --path ." + nu --commands $"use ($env.PWD)/nupm/; nupm test" diff --git a/nupm/install.nu b/nupm/install.nu index b2e0f76..0429500 100644 --- a/nupm/install.nu +++ b/nupm/install.nu @@ -87,7 +87,9 @@ def install-path [ let destination = $module_dir | path join $package.name if $force { - rm --recursive --force $destination + if ($destination | path exists) { + rm --recursive --force $destination + } } if ($destination | path type) == dir {