Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieldonadel committed Feb 26, 2024
1 parent 2b50598 commit a16dd3e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
8 changes: 6 additions & 2 deletions apps/menu-bar/modules/auto-updater/electron/Updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ export default class Updater extends EventEmitter {
}

get build() {
if (!this.checkIsInitialized()) return;
if (!this.checkIsInitialized()) {
return null;
}
return this.options.build;
}

Expand All @@ -201,7 +203,9 @@ export default class Updater extends EventEmitter {
}

get version() {
if (!this.checkIsInitialized()) return;
if (!this.checkIsInitialized()) {
return null;
}
return this.options.version;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ async function setExecFlag(filePath: string) {
}

fs.chmod(filePath, '0755', (e) => {
e ? reject(`Cannot chmod of ${filePath}`) : resolve(filePath);
if (e) {
reject(new Error(`Cannot chmod of ${filePath}`));
} else {
resolve(filePath);
}
});
});
});
Expand Down
1 change: 1 addition & 0 deletions apps/menu-bar/modules/auto-updater/electron/utils/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export function readPackageJson(appPath: string | undefined) {
const content = fs.readFileSync(packageFile, 'utf-8');
return JSON.parse(content);
} catch (e) {
console.log('Error reading package.json', e);
return {};
}
}

0 comments on commit a16dd3e

Please sign in to comment.