Browse Source

Allow shorthand aliases with `now --alias` (#206)

master
Luke Childs 8 years ago
committed by Leo Lamprecht
parent
commit
efb8da72e7
  1. 8
      bin/now-deploy.js

8
bin/now-deploy.js

@ -569,8 +569,14 @@ const assignAlias = async (autoAlias, token, deployment) => {
}
}
// Throw an error if it doesn't
// If alias doesn't exist
if (!related) {
// Check if the uid was actually an alias
if (type === 'uid') {
return assignAlias(`${autoAlias}.now.sh`, token, deployment)
}
// If not, throw an error
const withID = type === 'uid' ? 'with ID ' : ''
error(`Alias ${withID}"${autoAlias}" doesn't exist`)
return

Loading…
Cancel
Save