diff --git a/lib/keys.js b/lib/keys.js index 1903c86a..fe851346 100644 --- a/lib/keys.js +++ b/lib/keys.js @@ -77,7 +77,9 @@ function updateCreds(key, profile, force){ // in case the user never ran `aws configure`.. if(!fs.existsSync(credFile)){ - fs.mkdirSync(credPath); + if(!fs.existsSync(credPath)) { + fs.mkdirSync(credPath); + } fs.closeSync(fs.openSync(credFile, 'w')); }