Skip to content

Commit

Permalink
fix(list): empty list when no authed orgs are found (#552)
Browse files Browse the repository at this point in the history
  • Loading branch information
aemounib authored Dec 12, 2022
1 parent 70f1d6e commit b510c11
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/commands/auth/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export default class List extends SfdxCommand {
public async run(): Promise<OrgAuthorization[]> {
try {
const auths = await AuthInfo.listAllAuthorizations();
if (auths.length === 0) {
this.ux.log(messages.getMessage('noResultsFound'));
return [];
}
auths.map((auth: OrgAuthorization & { alias: string }) => {
// core3 moved to aliases as a string[], revert to alias as a string
auth.alias = auth.aliases.join(',');
Expand Down

0 comments on commit b510c11

Please sign in to comment.