Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit c50a005

Browse files
authored
do not error on fresh installs (#568)
1 parent 7f8f87c commit c50a005

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

modules/desktop/electron/libs/tea-dir.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ export const getGuiPath = () => {
3030

3131
export async function getInstalledPackages(): Promise<InstalledPackage[]> {
3232
const pkgsPath = getTeaPath();
33+
34+
if (!fs.existsSync(pkgsPath)) {
35+
log.info(`packages path ${pkgsPath} does not exist, no installed packages`);
36+
return [];
37+
}
38+
3339
log.info("recursively reading:", pkgsPath);
3440
const folders = await deepReadDir({
3541
dir: pkgsPath,

0 commit comments

Comments
 (0)