diff --git a/CHANGELOG.md b/CHANGELOG.md index 11a28908a..885a41d7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ IMPROVEMENTS: BUG FIXES: * core: Fix loading plugins from pwd. [GH-1521] + * builder/amazon: Prefer token in config if given. [GH-1544] * builder/virtualbox: Can read VirtualBox version on FreeBSD. [GH-1570] * builder/virtualbox: More robust reading of guest additions URL. [GH-1509] * builder/vmware: Always remove floppies/drives. [GH-1504] diff --git a/builder/amazon/common/access_config.go b/builder/amazon/common/access_config.go index 0020791e0..a9a60d7cf 100644 --- a/builder/amazon/common/access_config.go +++ b/builder/amazon/common/access_config.go @@ -26,7 +26,7 @@ func (c *AccessConfig) Auth() (aws.Auth, error) { c.SecretKey = auth.SecretKey c.Token = auth.Token } - if auth.Token == "" && c.Token != "" { + if c.Token != "" { auth.Token = c.Token }