Carlos Reyna
03/07/2025, 8:25 PMinfo := schema.ConfigAndStacksInfo{
Component: args[0],
ComponentFolderPrefix: "terraform",
}
atmosConfig, err := cfg.InitCliConfig(info, true)
if err != nil {
u.PrintErrorMarkdownAndExit("", err, "")
}
I ask wondering why we do not execute the initialization before calling the command
var docsCmd = &cobra.Command{
Use: "docs",
Short: "Open Atmos documentation or display component-specific docs",
Long: `This command opens the Atmos docs or displays the documentation for a specified Atmos component.`,
Example: "atmos docs vpc",
Args: cobra.MaximumNArgs(1),
FParseErrWhitelist: struct{ UnknownFlags bool }{UnknownFlags: false},
ValidArgsFunction: ComponentsArgCompletion,
Run: func(cmd *cobra.Command, args []string) {Carlos Reyna
03/07/2025, 8:32 PM// Check Atmos configuration
checkAtmosConfig()