superfly / flyctl

Command line tools for fly.io services
https://fly.io
Apache License 2.0
1.43k stars 240 forks source link

--org parameter is ignored #2746

Open yanc0 opened 1 year ago

yanc0 commented 1 year ago

Describe the bug

--org argument is set but the command is asking for the organization anyway.

Paste your fly.toml

app = "radicale"
primary_region = "cdg"

[http_service]
  internal_port = 5232
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 0
  processes = ["app"]

[mounts]
  source = "radicale_data"
  destination = "/data

Command output:

$ flyctl ssh issue --agent --org personal
? Select Organization:  [Use arrows to move, type to filter]
> Yann (personal)
  my.org.com (my-org-com)
redjonzaci commented 1 year ago

I believe --org needs to be the first arg as per flyctl/internal/command/ssh/issue.go:83.

yanc0 commented 1 year ago

Thanks you for your help @redjonzaci ! Unfortunately, it does not work either.

redjonzaci commented 1 year ago

Did you try flyctl ssh issue personal? 😉 Maybe the docs need to be updated as they describe both an [org] arg and --org flag.

image
redjonzaci commented 1 year ago

@jsierles sorry to tag you here, but I see you added issue.go. Do we want to proceed with an org arg or --org flag?

redjonzaci commented 1 year ago

@dangra do you think we could do something for this?

dangra commented 1 year ago

@redjonzaci I'd drop the "org as first arg" syntax and rely on your recent work on flag.GetOrg() only.

Convert path to a flag too.