mirror of
https://github.com/ivabus/gui
synced 2025-04-23 14:07:14 +03:00
do not error on fresh installs (#568)
This commit is contained in:
parent
7f8f87cdc7
commit
c50a0058b3
1 changed files with 6 additions and 0 deletions
|
@ -30,6 +30,12 @@ export const getGuiPath = () => {
|
||||||
|
|
||||||
export async function getInstalledPackages(): Promise<InstalledPackage[]> {
|
export async function getInstalledPackages(): Promise<InstalledPackage[]> {
|
||||||
const pkgsPath = getTeaPath();
|
const pkgsPath = getTeaPath();
|
||||||
|
|
||||||
|
if (!fs.existsSync(pkgsPath)) {
|
||||||
|
log.info(`packages path ${pkgsPath} does not exist, no installed packages`);
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
log.info("recursively reading:", pkgsPath);
|
log.info("recursively reading:", pkgsPath);
|
||||||
const folders = await deepReadDir({
|
const folders = await deepReadDir({
|
||||||
dir: pkgsPath,
|
dir: pkgsPath,
|
||||||
|
|
Loading…
Reference in a new issue