MCPcopy Create free account
hub / github.com/auth0/auth0-cli / ensureConfigFilePath

Function ensureConfigFilePath

internal/cli/acul_config.go:188–197  ·  view source on GitHub ↗

ensureConfigFilePath sets a default config file path if none is provided and creates the config directory.

(input *aculConfigInput, cli *cli)

Source from the content-addressed store, hash-verified

186
187// ensureConfigFilePath sets a default config file path if none is provided and creates the config directory.
188func ensureConfigFilePath(input *aculConfigInput, cli *cli) error {
189 if input.filePath == "" {
190 input.filePath = fmt.Sprintf("acul_config/%s.json", input.screenName)
191 cli.renderer.Warnf("No configuration file path specified. Defaulting to '%s'.", ansi.Green(input.filePath))
192 }
193 if err := os.MkdirAll("acul_config", 0755); err != nil {
194 return fmt.Errorf("could not create config directory: %w", err)
195 }
196 return nil
197}
198
199// Generate default ACUL config stub.
200func defaultACULConfig() map[string]interface{} {

Callers 2

aculConfigGenerateCmdFunction · 0.85
aculConfigGetCmdFunction · 0.85

Calls 3

GreenFunction · 0.92
WarnfMethod · 0.80
ErrorfMethod · 0.80

Tested by

no test coverage detected