|
7 | 7 | import { basename, join } from 'path'; |
8 | 8 | import * as fs from 'fs/promises'; |
9 | 9 |
|
10 | | -import { Org, AuthInfo, sfdc, ConfigAggregator, Global, AuthFields, Logger, SfError } from '@salesforce/core'; |
| 10 | +import { Org, AuthInfo, sfdc, SfdxConfigAggregator, Global, AuthFields, Logger, SfError } from '@salesforce/core'; |
11 | 11 | import { Dictionary, JsonMap } from '@salesforce/ts-types'; |
12 | 12 | import { Record } from 'jsforce'; |
13 | 13 | import { omit } from '@salesforce/kit/lib'; |
@@ -164,7 +164,7 @@ export class OrgListUtil { |
164 | 164 | scratchOrgs: [], |
165 | 165 | nonScratchOrgs: [], |
166 | 166 | }; |
167 | | - const config = (await ConfigAggregator.create()).getConfig(); |
| 167 | + const config = (await SfdxConfigAggregator.create()).getConfig(); |
168 | 168 |
|
169 | 169 | for (const authInfo of authInfos) { |
170 | 170 | let currentValue: ExtendedAuthFields; |
@@ -210,14 +210,11 @@ export class OrgListUtil { |
210 | 210 |
|
211 | 211 | /** Identify the default orgs */ |
212 | 212 | public static identifyDefaultOrgs(orgInfo: ExtendedAuthFields, config: JsonMap): void { |
213 | | - if ( |
214 | | - config.defaultusername && |
215 | | - (orgInfo.username === config.defaultusername || orgInfo.alias === config.defaultusername) |
216 | | - ) { |
| 213 | + if (config['target-org'] && (orgInfo.username === config['target-org'] || orgInfo.alias === config['target-org'])) { |
217 | 214 | orgInfo.isDefaultUsername = true; |
218 | 215 | } else if ( |
219 | | - config.defaultdevhubusername && |
220 | | - (orgInfo.username === config.defaultdevhubusername || orgInfo.alias === config.defaultdevhubusername) |
| 216 | + config['target-dev-hub'] && |
| 217 | + (orgInfo.username === config['target-dev-hub'] || orgInfo.alias === config['target-dev-hub']) |
221 | 218 | ) { |
222 | 219 | orgInfo.isDefaultDevHubUsername = true; |
223 | 220 | } |
|
0 commit comments