Skip to content

Commit 3b4ea52

Browse files
Merge pull request #716 from salesforcecli/ew/missing-sfdx-dir-error
Ensure sfdx dir exists
2 parents 4a0ed3f + 2046a9a commit 3b4ea52

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/shared/orgListUtil.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ export class OrgListUtil {
129129
* @param fileNames All the filenames in the global hidden folder
130130
*/
131131
public static async readAuthFiles(fileNames: string[]): Promise<AuthInfo[]> {
132+
// Ensure that the Global.SFDX_DIR exists
133+
// https://github.com/forcedotcom/cli/issues/2222
134+
await fs.mkdir(Global.SFDX_DIR, { recursive: true });
135+
132136
const orgFileNames = (await fs.readdir(Global.SFDX_DIR)).filter((filename: string) =>
133137
filename.match(/^00D.{15}\.json$/g)
134138
);

0 commit comments

Comments
 (0)