Skip to content

Commit

Permalink
Fix list usage in asdf.nu
Browse files Browse the repository at this point in the history
After installing asdf.nu in my nushell config, running `asdf plugin list` gives me the following error:

❯ asdf plugin list
Error: nu::shell::cannot_pass_list_to_external

  × Lists are not automatically spread when calling external commands
     ╭─[/opt/asdf-vm/asdf.nu:110:27]
 109 │ 
 110 │         ^asdf plugin list $flags | lines | parse -r $template | str trim
     ·                           ───┬──
     ·                              ╰── Spread operator (...) is necessary to spread lists
 111 │     }
     ╰────
  help: Either convert the list to a string or use the spread operator, like so: ...$flags

This change fixes the error.
  • Loading branch information
Cantido authored Apr 10, 2024
1 parent ccdd47d commit f924113
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion asdf.nu
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ module asdf {

let flags = ($params | where enabled | get --ignore-errors flag | default '' )

^asdf plugin list $flags | lines | parse -r $template | str trim
^asdf plugin list ...$flags | lines | parse -r $template | str trim
}

# list all available plugins
Expand Down

0 comments on commit f924113

Please sign in to comment.