flyctl -a docs and behavior mismatch

so in the config file docs page it says:

Whenever flyctl is run, it will look for a fly.toml file in the current directory and use the application name in that file. This behavior can be overridden by using the -a flag to set the application name

so I have a fly.toml, it has the application name in that file, and I pass a different application name via the FLY_APP env var. Sometimes, this Just Works™, like in the case of fly status, and I get the app set in the env var.

Sometimes, though, I get a fun, scary warning and the command hangs forever waiting for my input to confirm that I actually meant the thing in the env var and not the thing in the toml file:

$ FLY_APP=other-app fly regions list
WARN app flag 'other-app' does not match app name in config file 'config-file-app'

So far I’ve worked around this by removing the app name from the config file entirely, and that actually seems to work… but that isn’t mentioned as an option in the config docs. :sweat_smile:

Thanks for bringing this up. We know some commands have inconsistent behavior - we’re in the middle of porting these over to a new structure that has this bug fixed. So it should be fixed soonish :smiley:

1 Like