Skip to content

Commit

Permalink
Revert "remove the destination only if it exists (#62)" (#66)
Browse files Browse the repository at this point in the history
related to
- #62
- nushell/nushell#11656

## Description
this commit reverts #62 because it
was just a bug introduced recently and now fixed in
nushell/nushell#11656.
  • Loading branch information
amtoine authored Jan 28, 2024
1 parent 80992b5 commit fcd04e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 1 addition & 3 deletions nupm/install.nu
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit fcd04e9

Please sign in to comment.