Skip to content

Commit 2046a9a

Browse files
committed
fix: ensure sfdx dir exists
1 parent d25c08b commit 2046a9a

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)