Skip to content

Commit

Permalink
fix: ensure force generation is passed through to generator
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanSpeakEasy committed Jan 9, 2024
1 parent cc4b2e6 commit 0dd7f02
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ func Generate(docPath, lang, outputDir, installationURL string, published, outpu
args = append(args, "-t")
}

if environment.ForceGeneration() {
fmt.Println("force input enabled - setting SPEAKEASY_FORCE_GENERATION=true")
os.Setenv("SPEAKEASY_FORCE_GENERATION", "true")
}

out, err := runSpeakeasyCommand(args...)
if err != nil {
return fmt.Errorf("error generating sdk: %w - %s", err, out)
Expand Down

0 comments on commit 0dd7f02

Please sign in to comment.