From 43c27a381777d80caa44f1e40cea0d1d92086b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=BCbleitner?= Date: Mon, 26 Aug 2019 23:11:58 +0200 Subject: [PATCH] installed and exists is the same for FSExtensions --- src/backend/UpdateManger.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/backend/UpdateManger.ts b/src/backend/UpdateManger.ts index 402b9bc..2e1bf8c 100644 --- a/src/backend/UpdateManger.ts +++ b/src/backend/UpdateManger.ts @@ -93,7 +93,6 @@ abstract class Extension{ export type FSStatus = SharedStatus & { prefix: string - exists: boolean empty: boolean } @@ -123,14 +122,14 @@ export abstract class FSExtension extends Extension{ - if (!this.exists) return false + if (!this.isInstalled) return false else { const files = await fs.readdir(this.prefix) return files.length === 0 } } - public async exists(): Promise{ + public async isInstalled(): Promise{ try { await fs.access(path.resolve(this.prefix, this.name)) return true @@ -157,7 +156,6 @@ export class NPMExtension extends FSExtension{ public async status(): Promise { const empty = this.isEmpty() - const exists = this.exists() const i = this.isInstalled() const o = this.isOutdated() const n = this.name