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

Function cleanOutputDirectory

internal/cli/terraform.go:466–482  ·  view source on GitHub ↗
(outputDIR string)

Source from the content-addressed store, hash-verified

464}
465
466func cleanOutputDirectory(outputDIR string) error {
467 var joinedErrors error
468
469 if err := os.Remove(path.Join(outputDIR, "auth0_main.tf")); err != nil && !os.IsNotExist(err) {
470 joinedErrors = errors.Join(err)
471 }
472
473 if err := os.Remove(path.Join(outputDIR, "auth0_import.tf")); err != nil && !os.IsNotExist(err) {
474 joinedErrors = errors.Join(err)
475 }
476
477 if err := os.Remove(path.Join(outputDIR, "auth0_generated.tf")); err != nil && !os.IsNotExist(err) {
478 joinedErrors = errors.Join(err)
479 }
480
481 return joinedErrors
482}
483
484// sanitizeResourceName will return a valid terraform resource name.
485//

Callers 2

TestCleanOutputDirectoryFunction · 0.85
generateTerraformCmdRunFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestCleanOutputDirectoryFunction · 0.68