@salesforce/sf-plugins-core 1.22.0 → 1.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/flags/orgFlags.js +14 -2
- package/package.json +1 -1
package/lib/flags/orgFlags.js
CHANGED
|
@@ -26,9 +26,21 @@ async function maybeGetOrg(input) {
|
|
|
26
26
|
}
|
|
27
27
|
exports.maybeGetOrg = maybeGetOrg;
|
|
28
28
|
const maybeGetHub = async (input) => {
|
|
29
|
-
|
|
29
|
+
let org;
|
|
30
|
+
// user provided input, verify the org exits
|
|
31
|
+
if (input) {
|
|
32
|
+
org = await (0, exports.getOrgOrThrow)(input);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
// no input, check config for a default
|
|
36
|
+
const aliasOrUsername = await getDefaultHub(false);
|
|
37
|
+
// if there is a default, verify the org exists
|
|
38
|
+
if (aliasOrUsername) {
|
|
39
|
+
org = await (0, exports.getOrgOrThrow)(aliasOrUsername);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
30
42
|
if (org) {
|
|
31
|
-
return ensureDevHub(org,
|
|
43
|
+
return ensureDevHub(org, org.getUsername());
|
|
32
44
|
}
|
|
33
45
|
else {
|
|
34
46
|
return undefined;
|