Browse Source

Fix domain/subdomain usage on `now alias`'s `buy` logic

master
Matheus Fernandes 8 years ago
parent
commit
9213e8acda
No known key found for this signature in database GPG Key ID: DD07CA4EA7B65C4F
  1. 7
      lib/alias.js

7
lib/alias.js

@ -533,7 +533,7 @@ module.exports = class Alias extends Now {
stopSpinner = wait('Purchasing')
let domain
try {
domain = await domains.buy(alias)
domain = await domains.buy(parsed.domain)
} catch (err) {
stopSpinner()
treatBuyError(err)
@ -548,7 +548,7 @@ module.exports = class Alias extends Now {
let domainInfo
try {
domainInfo = await this.setupDomain(alias)
domainInfo = await this.setupDomain(parsed.domain)
} catch (err) {
if (this._debug) {
console.log('> [debug] Error while trying to setup the domain', err)
@ -558,8 +558,7 @@ module.exports = class Alias extends Now {
stopSpinner()
if (!domainInfo.verified) {
let { tld } = publicSuffixList.parse(alias)
tld = param(`.${tld}`)
const tld = param(`.${parsed.tld}`)
error(
'The nameservers are pending propagation. Please try again shortly'
)

Loading…
Cancel
Save