diff --git a/README.md b/README.md index f644e0cd94..5f691f452b 100644 --- a/README.md +++ b/README.md @@ -1183,7 +1183,7 @@ $ scw inspect myserver | jq '.[0].public_ip.address' ### master (unreleased) -* No entry +* Fix bug when using SCW_COMMERCIAL_TYPE variable View full [commits list](https://github.com/scaleway/scaleway-cli/compare/v1.8.1...master) diff --git a/pkg/api/helpers.go b/pkg/api/helpers.go index 7b18a81830..72a59c8c3f 100644 --- a/pkg/api/helpers.go +++ b/pkg/api/helpers.go @@ -300,7 +300,7 @@ type ConfigCreateServer struct { // CreateServer creates a server using API based on typical server fields func CreateServer(api *ScalewayAPI, c *ConfigCreateServer) (string, error) { commercialType := os.Getenv("SCW_COMMERCIAL_TYPE") - if commercialType != "" { + if commercialType == "" { commercialType = c.CommercialType }