diff --git a/lib/alias.js b/lib/alias.js index 9c4e8ad..35f926f 100644 --- a/lib/alias.js +++ b/lib/alias.js @@ -9,6 +9,11 @@ export default class Alias extends Now { async ls (deployment) { if (deployment) { const target = await this.findDeployment(deployment); + if (!target) { + const err = new Error(`Aliases not found by "${deployment}". Run ${chalk.dim('`now alias ls`')} to see your aliases.`); + err.userError = true; + throw err; + } return this.retry(async (bail, attempt) => { const res = await this._fetch(`/now/deployments/${target.uid}/aliases`);