Skip to content

Commit

Permalink
chore: format recommended actions slightly more inward (#2792)
Browse files Browse the repository at this point in the history
🥺

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
  • Loading branch information
efekarakus authored Aug 30, 2021
1 parent 0620d73 commit 07089bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions internal/pkg/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ func logRecommendedActions(actions []string) {
return
}
log.Infoln(fmt.Sprintf("Recommended follow-up %s:", english.PluralWord(len(actions), "action", "actions")))
prefix := "- "
prefix := " -"
if len(actions) == 1 {
prefix = " "
prefix = " "
}
for _, followup := range actions {
log.Infof("%s %s\n", prefix, followup)
Expand Down
8 changes: 4 additions & 4 deletions internal/pkg/cli/svc_deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ func (o *deploySvcOpts) uriRecommendedActions() ([]string, error) {
}
if o.rdSvcAlias != "" {
recs = append(recs, fmt.Sprintf(`The validation process for https://%s can take more than 15 minutes.
Please visit %s to check the validation status.`, o.rdSvcAlias, color.Emphasize("https://console.aws.amazon.com/apprunner/home")))
Please visit %s to check the validation status.`, o.rdSvcAlias, color.Emphasize("https://console.aws.amazon.com/apprunner/home")))
}
return recs, nil
}
Expand All @@ -856,7 +856,7 @@ func (o *deploySvcOpts) subscribeRecommendedActions() []string {
retrieveEnvVarCode := "const eventsQueueURI = process.env.COPILOT_QUEUE_URI"
actionRetrieveEnvVar := fmt.Sprintf(
`Update %s's code to leverage the injected environment variable "COPILOT_QUEUE_URI".
In JavaScript you can write %s.`,
In JavaScript you can write %s.`,
o.name,
color.HighlightCode(retrieveEnvVarCode),
)
Expand All @@ -868,7 +868,7 @@ func (o *deploySvcOpts) subscribeRecommendedActions() []string {
retrieveTopicQueueEnvVarCode := fmt.Sprintf("const {%s} = JSON.parse(process.env.COPILOT_TOPIC_QUEUE_URIS)", topicQueueNames)
actionRetrieveTopicQueues := fmt.Sprintf(
`You can retrieve topic-specific queues by writing
%s.`,
%s.`,
color.HighlightCode(retrieveTopicQueueEnvVarCode),
)
recs = append(recs, actionRetrieveTopicQueues)
Expand All @@ -889,7 +889,7 @@ func (o *deploySvcOpts) publishRecommendedActions() []string {

return []string{
fmt.Sprintf(`Update %s's code to leverage the injected environment variable "COPILOT_SNS_TOPIC_ARNS".
In JavaScript you can write %s.`,
In JavaScript you can write %s.`,
o.name,
color.HighlightCode("const {<topicName>} = JSON.parse(process.env.COPILOT_SNS_TOPIC_ARNS)")),
}
Expand Down

0 comments on commit 07089bd

Please sign in to comment.