fix: correct list usage in asdf.nu

After installing asdf.nu in my nushell config, running `asdf plugin list` gives me the following error:

❯ asdf plugin list
Error: nu:🐚: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.
This commit is contained in:
Rosa Richter 2024-04-10 10:43:36 -06:00
parent ccdd47df9b
commit bcd33c861f
No known key found for this signature in database

View File

@ -107,7 +107,7 @@ module asdf {
let flags = ($params | where enabled | get --ignore-errors flag | default '' ) 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 # list all available plugins