freckle / stackctl

Manage CloudFormation Stacks through specifications
MIT License
14 stars 1 forks source link

Fix Subcommand interface #34

Closed pbrisbin closed 1 year ago

pbrisbin commented 1 year ago

One "actual commit" and one (well, now three) drive-by:

Push runAppT into Subcommand{run}

When all Subcommands are called with runAppT, it meant we always had to initialize the App no matter the subcommand. This led to a surprising scenario where even something trivial like stack version requires a valid AWS connection. Oops.

Making Subcommand{run} call runAppT itself is no more complicated (especially with the runAppSubcommand helper), in fact it makes the constraints in the Commands module simpler, and it naturally allows for some subcommands to not do that (like version) and so not incur the AWS requirements.

Fix incorrect run-vs-parse naming