Skip to content

Commit

Permalink
fix: handle lack of bin (happens in UT when stubbing config) (#758)
Browse files Browse the repository at this point in the history
* fix: handle lack of bin (happens in UT when stubbing config)

* chore: the actual change
  • Loading branch information
mshanemc authored Aug 8, 2023
1 parent 84a8e99 commit 11e4f73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ export class Config implements IConfig {
* @returns {string[]} e.g. ['SF_DEBUG', 'SFDX_DEBUG']
*/
public scopedEnvVarKeys(k: string): string[] {
return [this.bin, ...this.binAliases ?? []].map(alias =>
return [this.bin, ...this.binAliases ?? []].filter(alias => Boolean(alias)).map(alias =>
[alias.replace(/@/g, '').replace(/[/-]/g, '_'), k].join('_').toUpperCase())
}

Expand Down

0 comments on commit 11e4f73

Please sign in to comment.