Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/cloudx/proxy/cmd_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func getEndpointURL(cmd *cobra.Command) (*url.URL, error) {

func printDeprecations(cmd *cobra.Command, target string) {
if deprecated := stringsx.Coalesce(os.Getenv(envVarSDK), os.Getenv(envVarKratos)); len(deprecated) > 0 {
_, _ = fmt.Fprintf(cmd.ErrOrStderr(), "It is recommended to use the --%s flag or the %s environment variable for better developer exeprience. Environment variables %s and %s will continue to work!\n", ProjectFlag, envVarSlug, envVarSDK, envVarKratos)
_, _ = fmt.Fprintf(cmd.ErrOrStderr(), "It is recommended to use the --%s flag or the %s environment variable for better developer experience. Environment variables %s and %s will continue to work!\n", ProjectFlag, envVarSlug, envVarSDK, envVarKratos)
}

found := map[string]string{}
Expand Down
2 changes: 1 addition & 1 deletion cmd/cloudx/proxy/cmd_proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func TestGetEndpointURL(t *testing.T) {
actual, err := getEndpointURL(cmd)
require.NoError(t, err)
assert.Equal(t, expected, actual.String())
assert.Equal(t, "It is recommended to use the --project flag or the ORY_PROJECT_SLUG environment variable for better developer exeprience. Environment variables ORY_SDK_URL and ORY_KRATOS_URL will continue to work!\nAttention! We found multiple sources for the project slug. Please clean up environment variables and flags to ensure that the correct value is being used. Found values:\n\n\t--project=not-someslug\n\tORY_SDK_URL=https://someslug.projects.oryapis.com/\n\nOrder of precedence is: ORY_PROJECT_SLUG > ORY_SDK_URL > ORY_KRATOS_URL > --project\nDecided to use value: https://someslug.projects.oryapis.com/\n\n", b.String())
assert.Equal(t, "It is recommended to use the --project flag or the ORY_PROJECT_SLUG environment variable for better developer experience. Environment variables ORY_SDK_URL and ORY_KRATOS_URL will continue to work!\nAttention! We found multiple sources for the project slug. Please clean up environment variables and flags to ensure that the correct value is being used. Found values:\n\n\t--project=not-someslug\n\tORY_SDK_URL=https://someslug.projects.oryapis.com/\n\nOrder of precedence is: ORY_PROJECT_SLUG > ORY_SDK_URL > ORY_KRATOS_URL > --project\nDecided to use value: https://someslug.projects.oryapis.com/\n\n", b.String())
})

t.Run("should fail if legacy value is not a URL", func(t *testing.T) {
Expand Down