From 10be468c0c3e164fed171c947dbe437b2325605c Mon Sep 17 00:00:00 2001 From: mshanemc Date: Mon, 11 Apr 2022 08:02:17 -0500 Subject: [PATCH] fix: throw if input provided but no org found --- src/flags/orgFlags.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/flags/orgFlags.ts b/src/flags/orgFlags.ts index 875b34d14..541e11b4a 100644 --- a/src/flags/orgFlags.ts +++ b/src/flags/orgFlags.ts @@ -14,7 +14,11 @@ const maybeGetOrg = async (input?: string): Promise => { try { return Org.create({ aliasOrUsername: input }); } catch (e) { - return undefined; + if (!input) { + return undefined; + } else { + throw e; + } } };