fix: add debug logging
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import * as fs from 'fs-extra';
|
||||
import * as path from 'path';
|
||||
import { d } from './debug';
|
||||
|
||||
export enum AsarMode {
|
||||
NO_ASAR,
|
||||
@@ -7,9 +8,14 @@ export enum AsarMode {
|
||||
}
|
||||
|
||||
export const detectAsarMode = async (appPath: string) => {
|
||||
d('checking asar mode of', appPath);
|
||||
const asarPath = path.resolve(appPath, 'Contents', 'Resources', 'app.asar');
|
||||
|
||||
if (!(await fs.pathExists(asarPath))) return AsarMode.NO_ASAR;
|
||||
if (!(await fs.pathExists(asarPath))) {
|
||||
d('determined no asar');
|
||||
return AsarMode.NO_ASAR;
|
||||
}
|
||||
|
||||
d('determined has asar');
|
||||
return AsarMode.HAS_ASAR;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user