Skip to content

Extra arguments after "fly ips ls" ignored without error #2924

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

Open
bradfitz opened this issue Oct 19, 2023 · 1 comment · May be fixed by #4301
Open

Extra arguments after "fly ips ls" ignored without error #2924

bradfitz opened this issue Oct 19, 2023 · 1 comment · May be fixed by #4301
Labels
bug Something isn't working

Comments

@bradfitz
Copy link

Describe the bug

flyctl doesn't reject extra bogus args after "ips list".

  • Operating system
  • fly version

flyctl v0.1.110 linux/amd64 Commit: 6e05067 BuildDate: 2023-10-17T01:36:41Z

Paste your fly.toml

primary_region="sea"

Command output:

$ fly ips ls -a tb
VERSION IP      TYPE    REGION  CREATED AT 

$ fly ips ls -a tb sdlkfjsdlkfjsdlkfjslkdfj
VERSION IP      TYPE    REGION  CREATED AT 

$ echo $?
0
@bradfitz bradfitz added the bug Something isn't working label Oct 19, 2023
@usrme
Copy link
Contributor

usrme commented Feb 1, 2024

What would be the expected result for you? For my own application, it works as I would expect it to in that anything after the -a | --app flag is disregarded:

$ flyctl ips ls -a gobarchar
VERSION IP                      TYPE                    REGION  CREATED AT       
v6      2a09:8280:1::37:d7fb    public (dedicated)      global  Jan 5 2024 11:58
v4      66.241.125.7            public (shared)                 Jan 1 0001 00:00
$ flyctl ips ls -a gobarchar asdf
VERSION IP                      TYPE                    REGION  CREATED AT       
v6      2a09:8280:1::37:d7fb    public (dedicated)      global  Jan 5 2024 11:58
v4      66.241.125.7            public (shared)                 Jan 1 0001 00:00
$ echo $?
0
$ flyctl version
flyctl v0.1.143 linux/amd64 Commit: 6d5058a4 BuildDate: 2024-01-16T19:28:48Z

grgar added a commit to grgars/flyctl that referenced this issue Apr 8, 2025
- Fixes superfly#2924

Makes it easier to identify errors in running commands where `-` has been missed for example. Rather than silently ignoring the argument, an error message is reported.
@grgar grgar linked a pull request Apr 8, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants