Skip to content

Commit

Permalink
Can be overwritten with environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
babarot committed Dec 3, 2017
1 parent 4853ccc commit 224e580
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,20 @@ func run(args []string) int {
fmt.Fprintf(os.Stderr, "Error: %s\n", err.Error())
return 1
default:
url = args[0]
// url = args[0]
}

url = args[len(args)-1]

env, err := cfg.GetEnv(url)
if err != nil {
fmt.Fprintf(os.Stderr, "Error: %s\n", err.Error())
fmt.Fprintf(os.Stderr, " similar urls found %q\n", cfg.SimilarURLs(url))
return 1
}
credentials = os.Getenv(GoogleApplicationCredentials)
clientID = os.Getenv(IAPClientID)
binary = os.Getenv(IAPCurlBinary)
if credentials == "" {
credentials, _ = homedir.Expand(env.Credentials)
}
Expand Down

0 comments on commit 224e580

Please sign in to comment.