Skip to content

Commit

Permalink
Merge pull request #716 from salesforcecli/ew/missing-sfdx-dir-error
Browse files Browse the repository at this point in the history
Ensure sfdx dir exists
  • Loading branch information
WillieRuemmele authored Jun 28, 2023
2 parents 4a0ed3f + 2046a9a commit 3b4ea52
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/shared/orgListUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ export class OrgListUtil {
* @param fileNames All the filenames in the global hidden folder
*/
public static async readAuthFiles(fileNames: string[]): Promise<AuthInfo[]> {
// Ensure that the Global.SFDX_DIR exists
// https://github.com/forcedotcom/cli/issues/2222
await fs.mkdir(Global.SFDX_DIR, { recursive: true });

const orgFileNames = (await fs.readdir(Global.SFDX_DIR)).filter((filename: string) =>
filename.match(/^00D.{15}\.json$/g)
);
Expand Down

0 comments on commit 3b4ea52

Please sign in to comment.