Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct list usage in asdf.nu #1738

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Cantido
Copy link

@Cantido Cantido commented Apr 10, 2024

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.

Summary

Uses the spread operator when passing a list into the asdf command

Fixes: No issue created, just the fix (would you like me to create an issue?)

Other Information

  • asdf version: v0.13.1-0586b37, installed via asdf-vim AUR package
  • nu version: 0.92.1, installed via nushell Arch package

@Cantido Cantido requested a review from a team as a code owner April 10, 2024 16:48
@Cantido
Copy link
Author

Cantido commented Apr 10, 2024

oops i didn't realize this project is using Conventional Commits, I'll get that fixed

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.
@Cantido Cantido changed the title Fix list usage in asdf.nu fix: correct list usage in asdf.nu Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant