Skip to content

Commit

Permalink
fix: throw if input provided but no org found
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Apr 11, 2022
1 parent b2f60d4 commit 10be468
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/flags/orgFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ const maybeGetOrg = async (input?: string): Promise<Org | undefined> => {
try {
return Org.create({ aliasOrUsername: input });
} catch (e) {
return undefined;
if (!input) {
return undefined;
} else {
throw e;
}
}
};

Expand Down

0 comments on commit 10be468

Please sign in to comment.