Skip to content

Commit 1cb6333

Browse files
committed
fix: case of empty orgId dir
1 parent 3ba883f commit 1cb6333

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/compatibility.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ type TrackingFileVersion = 'plugin-source' | 'toolbelt' | 'none';
1818
*/
1919
export const getTrackingFileVersion = (org: Org, projectPath: string): TrackingFileVersion => {
2020
const orgsDir = path.join(projectPath, '.sfdx', 'orgs');
21+
const newFilesDir = path.join(orgsDir, org.getOrgId());
2122
// has new tracking files based on orgId
22-
if (fs.existsSync(path.join(orgsDir, org.getOrgId()))) {
23+
if (fs.existsSync(newFilesDir) && fs.readdirSync(newFilesDir).length > 0) {
2324
return 'plugin-source';
2425
}
2526
const username = org.getUsername();

0 commit comments

Comments
 (0)