From f68d3580ec761d9d4b03a7216dc08ec795aeeeb0 Mon Sep 17 00:00:00 2001 From: Quentin Perez Date: Wed, 20 Jan 2016 10:29:14 +0100 Subject: [PATCH] Use the same pattern for environment variables --- README.md | 2 ++ pkg/api/api.go | 4 ++-- pkg/utils/utils.go | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 81ab75bf64..22c9682f99 100644 --- a/README.md +++ b/README.md @@ -1154,6 +1154,8 @@ $ scw inspect myserver | jq '.[0].public_ip.address' ### master (unreleased) +* SCALEWAY_VERBOSE_API is now SCW_VERBOSE_API +* SCALEWAY_TLSVERIFY is now SCW_TLSVERIFY * Add a warn message when using `ssh exec` on host without public ip nor gateway ([#171](https://github.com/scaleway/scaleway-cli/issues/171)) * Display `ssh-host-fingerprints` when it's available ([#194](https://github.com/scaleway/scaleway-cli/issues/194)) * Support of `scw rmi` snapshot|volume ([#258](https://github.com/scaleway/scaleway-cli/issues/258)) diff --git a/pkg/api/api.go b/pkg/api/api.go index 911821876b..6666289e95 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -797,7 +797,7 @@ func NewScalewayAPI(apiEndPoint, accountEndPoint, organization, token string) (* Organization: organization, Token: token, Cache: cache, - verbose: os.Getenv("SCALEWAY_VERBOSE_API") != "", + verbose: os.Getenv("SCW_VERBOSE_API") != "", password: "", // internal @@ -805,7 +805,7 @@ func NewScalewayAPI(apiEndPoint, accountEndPoint, organization, token string) (* client: &http.Client{}, } - if os.Getenv("SCALEWAY_TLSVERIFY") == "0" { + if os.Getenv("SCW_TLSVERIFY") == "0" { s.client.Transport = &http.Transport{ TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, } diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 223f190e50..4e35cffb78 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -198,7 +198,7 @@ func AttachToSerial(serverID string, apiToken string) (*gottyclient.Client, chan return nil, nil, err } - if os.Getenv("SCALEWAY_TLSVERIFY") == "0" { + if os.Getenv("SCW_TLSVERIFY") == "0" { gottycli.SkipTLSVerify = true }