Browse Source

Thow error if specified `ls` selector not found

master
Tony Kovanen 9 years ago
parent
commit
794e89439f
  1. 5
      lib/alias.js

5
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`);

Loading…
Cancel
Save