Skip to content

Commit

Permalink
fixed lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Dec 25, 2024
1 parent 7942fc4 commit 0af2e3b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions services/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,12 +413,9 @@ function runService(): void {
type: string;
folderPath: string;
}
type AppsResponse = { apps: AppInfo[] };
async function getAppInfo(appId: string): Promise<AppInfo> {
const appList = await asyncCall<{ apps: AppInfo[] }>(
getInstallerService(),
'luna://com.webos.applicationManager/dev/listApps',
{},
);
const appList = await asyncCall<AppsResponse>(getInstallerService(), 'luna://com.webos.applicationManager/dev/listApps', {});
const appInfo = appList.apps.find((app) => app.id === appId);
if (!appInfo) throw new Error(`Invalid appId, or unsupported application type: ${appId}`);
return appInfo;
Expand Down Expand Up @@ -500,8 +497,9 @@ function runService(): void {
const appInfo = await getAppInfo(installedPackageId);
if (appInfo.type === 'native' && runningAsRoot) {
await createToast(`Updating jailer config for ${appInfo.title}…`, service);
await buildBetterJail(appInfo.id, appInfo.folderPath)
.catch((err) => console.warn('jailer execution failed:', err));
await buildBetterJail(appInfo.id, appInfo.folderPath).catch((err) => {
console.warn('jailer execution failed:', err);
});
}
await createToast(`Application installed: ${appInfo.title}`, service);
} catch (err: unknown) {
Expand Down

0 comments on commit 0af2e3b

Please sign in to comment.