Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: always bind flags to env vars when configuring a command
Previously the `bindFlags` function that sets command flags based on environment variables was only called the first time that the `Config` function executes for a command. In regular use, this isn't a problem because each time a user runs a `metal` command, it's a separate execution. However, this causes problems in end-to-end tests because only the first test of each subcommand runs the `bindFlags` function, so subsequent tests fail because they do not look up the API token in environment variables. This moves the `bindFlags` call so that it runs every time the `Config` function runs, which enables tests to consistently set flags based on environment variables.
- Loading branch information