Skip to content
Browse files

fixing a rare error where public dns was wrong if ec2 keyname starts …

…with 'ec2-'
  • Loading branch information...
1 parent 3568a28 commit 54c7b6c24bd367a9eaad8a5b380a91d0304290f9 @zakx zakx committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/aws.js
View
4 lib/aws.js
@@ -140,8 +140,8 @@ createService = function(api, name) {
stdout = stdout.split('\n');
stdout.map(function(item) {
- if (item.indexOf('ec2') !== -1) {
- data[item.replace(/.*\s(i\-\S*).*/g, '$1')] = item.replace(/.*(ec2\-\S*).*/g, '$1');
+ if (item.indexOf('ec2') !== -1 && item.indexOf('.com') !== -1) {
+ data[item.replace(/.*\s(i\-\S*).*/g, '$1')] = item.replace(/.*(ec2\-\S*\.com).*/g, '$1');
}
});

0 comments on commit 54c7b6c

Please sign in to comment.
Something went wrong with that request. Please try again.