Skip to content

Commit

Permalink
fix: don't require consumer to have plugin-settings installed (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc authored Nov 7, 2023
1 parent 3673dff commit 3f725d9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/testkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,10 @@ export const COMMANDS = {

const getDefaultUsername = async (): Promise<string> => {
const configVar = 'target-org';
const configResult = execCmd<Array<{ key?: string; name?: string; value: string }>>(`config:get ${configVar} --json`)
.jsonOutput?.result;
const configResult = execCmd<Array<{ key?: string; name?: string; value: string }>>(
`config:get ${configVar} --json`,
{ ensureExitCode: 0, cli: 'sf' }
).jsonOutput?.result;
// depending on which version of config:get the user has available, there may be a name or key
// eventually, drop the `key` option and the deprecated SfdxPropertyKeys
const possibleKeys = [configVar, SfdxPropertyKeys.DEFAULT_USERNAME];
Expand Down

0 comments on commit 3f725d9

Please sign in to comment.