diff --git a/lib/awscli.js b/lib/awscli.js index 3e571e3..c264d2f 100644 --- a/lib/awscli.js +++ b/lib/awscli.js @@ -41,7 +41,7 @@ function getDockerLoginToECRCommand() { '--region', this.options.region, '--query', 'Account', '--output', 'text', - '--profile', this.options.awsProfile, + ...(this.options.awsProfile ? ['--profile', this.options.awsProfile] : []), ]); return 'login -u AWS -p ' + passwordResult.stdout + ' ' +