Skip to content

Commit

Permalink
feature: change an output value for the create environment command
Browse files Browse the repository at this point in the history
Change the output value for the create environment command from `ID` to `slug`
  • Loading branch information
gibiw committed Jun 11, 2024
1 parent 900180a commit 55ec718
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/testops/env/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ func Command() *cobra.Command {
output = path.Join(dir, "qase.env")
}

err = os.WriteFile(output, []byte(fmt.Sprintf("QASE_ENVIRONMENT=%d", e.ID)), 0644)
err = os.WriteFile(output, []byte(fmt.Sprintf("QASE_ENVIRONMENT=%s", e.Slug)), 0644)
if err != nil {
return fmt.Errorf("failed to write environament ID to file: %w", err)
return fmt.Errorf("failed to write environament slug to file: %w", err)
}

slog.Info(fmt.Sprintf("Environment created with ID: %d", e.ID))
slog.Info(fmt.Sprintf("Environment created with slug: %s", e.Slug))

return nil
},
Expand Down

0 comments on commit 55ec718

Please sign in to comment.