Skip to content

Commit

Permalink
added callout that this env var is no longer used
Browse files Browse the repository at this point in the history
  • Loading branch information
rkoval committed Aug 5, 2021
1 parent 38e5916 commit fed9770
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions awsworkflow/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package awsworkflow

import (
"context"
"errors"
"net/http"
"os"
"strings"
Expand Down Expand Up @@ -55,6 +56,10 @@ var defaultAwsConsoleDomainChina string = "console.amazonaws.cn"
var defaultAwsConsoleDomainUsGov string = "console.amazonaws-us-gov.com"

func InitAWSConsoleDomain(region string) {
oldAwsConsoleDomain := os.Getenv("ALRED_AWS_CONSOLE_SERVICES_WORKFLOW_AWS_CONSOLE_DOMAIN")
if oldAwsConsoleDomain != "" {
panic(errors.New("`ALRED_AWS_CONSOLE_SERVICES_WORKFLOW_AWS_CONSOLE_DOMAIN` env var was renamed to `ALFRED_AWS_CONSOLE_SERVICES_WORKFLOW_AWS_CONSOLE_DOMAIN` due to the misspelling. Please update your config"))
}
awsConsoleDomain := os.Getenv("ALFRED_AWS_CONSOLE_SERVICES_WORKFLOW_AWS_CONSOLE_DOMAIN")
if awsConsoleDomain == "" {
if strings.HasPrefix(region, "cn-") {
Expand Down
4 changes: 4 additions & 0 deletions workflow/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ func Run(wf *aw.Workflow, rawQuery string, transport http.RoundTripper, forceFet
}

func finalize(wf *aw.Workflow, query *parsers.Query) {
if r := recover(); r != nil {
// we don't want this deferred function to prevent panics from showing in the workflow
panic(r)
}
if wf.IsEmpty() {
title := ""
subtitle := ""
Expand Down

0 comments on commit fed9770

Please sign in to comment.