Skip to content

nupm install --force tries to remove non-existing destinations #61

@amtoine

Description

@amtoine

related to

Description

Steps to reproduce

  • checkout the latest main of Nupm, i.e. 66e2eaa
  • bring the module into scope
use ./nupm/
  • try to install Nupm itself with a blank NUPM_HOME and the --force option to make sure whatever was there is overwritten
NUPM_HOME=/tmp/nupm nupm install --force --path . --no-confirm
  • see the following error
2024-01-28T10:05:44.110|INF|installing package nupm
Error:   × Directory not found
    ╭─[/home/amtoine/documents/repos/github.com/amtoine/nushell-nupm/nupm/install.nu:89:1]
 89 │             if $force {
 90 │                 rm --recursive --force $destination
    ·                                        ──────┬─────
    ·                                              ╰── Directory not found
 91 │             }
    ╰────

Version

key value
version 0.89.1
branch nightly
commit_hash 859f7b3dc7f7499efe10310910b004772e7c0bee
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.73.0 (cc66ad468 2023-10-03)
rust_channel 1.73.0-x86_64-unknown-linux-gnu
cargo_version cargo 1.73.0 (9c4383fb5 2023-08-26)
build_time 2024-01-28 01:49:46 +00:00
build_rust_channel release
allocator mimalloc
features default, sqlite, static-link-openssl, trash, which, zip
installed_plugins clipboard copy, clipboard paste, gstat, nu_plugin_explore

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions