fix: support nushell v0.75.0 (#1481)

This commit is contained in:
Edwin Kofler 2023-02-19 02:46:59 -08:00 committed by GitHub
parent fde0ce6c8e
commit dd8d3999d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 35 deletions

View File

@ -63,7 +63,7 @@ module asdf {
}
# ASDF version manager
export extern "asdf" [
export extern main [
subcommand?: string@"complete asdf sub-commands"
]

View File

@ -27,7 +27,6 @@ cleaned_path() {
echo \$env.ASDF_DIR"
[ "$status" -eq 0 ]
result=$(echo "$output" | grep "asdf")
[ "$result" = "$PWD" ]
}
@ -46,11 +45,8 @@ cleaned_path() {
[ "$status" -eq 0 ]
output_bin=$(echo "$output" | grep "asdf/bin")
[ "$output_bin" = "$PWD/bin" ]
output_shims=$(echo "$output" | grep "/shims")
[ "$output_shims" = "$HOME/.asdf/shims" ]
[[ "$output" == *"$PWD/bin"* ]]
[[ "$output" == *"$HOME/.asdf/shims"* ]]
}
@test "does not add paths to PATH more than once" {
@ -86,7 +82,7 @@ cleaned_path() {
[ "$output" = "$PWD" ]
}
@test "defines the asdf function" {
@test "defines the asdf or main function" {
run nu -c "
hide-env -i asdf
hide-env -i ASDF_DIR
@ -97,7 +93,6 @@ cleaned_path() {
which asdf | get path | to text"
[ "$status" -eq 0 ]
[[ "$output" =~ "command" ]]
}
@test "function calls asdf command" {