Skip to content

Commit

Permalink
fix: avoid generating names in an infinite loop (#62)
Browse files Browse the repository at this point in the history
* without this fix it will keep generating names for all eternity

* fix: without this fix it will keep generating names for all eternity
  • Loading branch information
softchris authored and manekinekko committed Sep 5, 2019
1 parent c0bba39 commit 192f38b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/util/azure/account.ts
Expand Up @@ -106,10 +106,11 @@ function checkNameAvailability(client: StorageManagementClient, warn?: boolean)
const availability = await client.storageAccounts.checkNameAvailability(account);
if (!availability.nameAvailable && warn) {
spinner.fail(availability.message || 'chosen name is not available');
return false;
} else {
spinner.stop();
return true;
}
return !!availability.nameAvailable;
};
}

Expand Down

0 comments on commit 192f38b

Please sign in to comment.