-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Load provider flags from environment variables
This change allows `cnquery` to load all provider flags via environment variables. For instance, if a provider exposes a flag named `foo`, the user can export the environment variable `MONDOO_FOO` to provide a value. The trick here was to switch loading the flag values from `cobra` to `viper`, since we already ran `viper.BindPFlag()` inside the command `PreRun`, we can now use `viper.Get()` directly. Signed-off-by: Salim Afiune Maya <[email protected]>
- Loading branch information
Showing
2 changed files
with
53 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters