FLY_APP env var no longer sets app name in flyctl since v0.0.272

It seems like a recent change in flyctl has broken the ability to set the app name via FLY_APP. We first noticed this in our Github Action deploys. The last successful deploy was 5 days ago. Since then, both Github Action runs as well as local flyctl test with env var set error out as below.

Running: $ FLY_APP=foobar flyctl logs on v0.0.272 and up returns error

Error we couldn't find a fly.toml nor an app specified by the -a flag. If you want to launch a new app, use 'flyctl launch'

but running it on v0.0.271 works.

I see from the commit logs that v0.0.272 moved to a new CLI system that seems to deprecate cobra, which integrates with viper, and viper is what is being used to load env vars previously.

My Golang is not great, but is it possible that due to the deprecation of cobra, env vars for FLY_APP are not being used?

We use FLY_APP as a way to inject the correct app name as we use the same Github Actions config for development and production, so this is blocking deploys right now.

Let me know if there’s any other info I can provide.

Thanks for the report. We released v0.0.277 which should fix this for you.

1 Like


Just installed and tested and our Github Actions are working again, as well as local test of $ FLY_APP=foobar flyctl logs is working again!

1 Like