Skip to content

Commit

Permalink
Add back env var for request data
Browse files Browse the repository at this point in the history
  • Loading branch information
erikostien-pingidentity committed Sep 20, 2024
1 parent ef6d768 commit 6ef7f59
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/configuration/request/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ func initDataOption() {
cobraParamName := "data"
cobraValue := new(customtypes.String)
defaultValue := customtypes.String("")
envVar := "PINGCTL_REQUEST_DATA"

options.RequestDataOption = options.Option{
CobraParamName: cobraParamName,
CobraParamValue: cobraValue,
DefaultValue: &defaultValue,
EnvVar: "", // No environment variable
EnvVar: envVar,
Flag: &pflag.Flag{
Name: cobraParamName,
Usage: "The data to send in the request. Use prefix '@' to specify data filepath instead of raw data.",
Usage: fmt.Sprintf("The data to send in the request. Use prefix '@' to specify data filepath instead of raw data. Also configurable via environment variable %s.", envVar),
Value: cobraValue,
DefValue: "",
},
Expand Down

0 comments on commit 6ef7f59

Please sign in to comment.