Skip to content

Commit

Permalink
use current Nushell executable in the build script (#36)
Browse files Browse the repository at this point in the history
this is a minor fix in case there might be a `nu` binary in the `PATH`
on top of the system `nu` one, with different versions.
this PR makes sure the one used inside the Nupm build script is the same
as the currently running Nushell instance.
  • Loading branch information
amtoine authored Mar 6, 2024
1 parent 426e3c9 commit cbbb1e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.nu
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def main [package_file: path] {
let name = open ($repo_root | path join "Cargo.toml") | get package.name

cargo install --path $repo_root --root $install_root
nu --commands $"register ($install_root | path join "bin" $name)"
^$nu.current-exe --commands $"register ($install_root | path join "bin" $name)"

log info "do not forget to restart Nushell for the plugin to be fully available!"
}

0 comments on commit cbbb1e1

Please sign in to comment.