mirror of
https://github.com/frappe/books.git
synced 2024-12-22 10:58:59 +00:00
fix: version on develop
- explicitly disable sandbox
This commit is contained in:
parent
df9b709db3
commit
05475fcacc
1
main.ts
1
main.ts
@ -94,6 +94,7 @@ export class Main {
|
||||
webPreferences: {
|
||||
contextIsolation: true,
|
||||
nodeIntegration: false,
|
||||
sandbox: false,
|
||||
preload,
|
||||
},
|
||||
autoHideMenuBar: true,
|
||||
|
@ -169,11 +169,17 @@ export default function registerIpcMainActionListeners(main: Main) {
|
||||
return await getConfigFilesWithModified(files);
|
||||
});
|
||||
|
||||
ipcMain.handle(IPC_ACTIONS.GET_ENV, () => {
|
||||
ipcMain.handle(IPC_ACTIONS.GET_ENV, async () => {
|
||||
let version = app.getVersion();
|
||||
if (main.isDevelopment) {
|
||||
const packageJson = await fs.readFile('package.json', 'utf-8');
|
||||
version = (JSON.parse(packageJson) as { version: string }).version;
|
||||
}
|
||||
|
||||
return {
|
||||
isDevelopment: main.isDevelopment,
|
||||
platform: process.platform,
|
||||
version: app.getVersion(),
|
||||
version,
|
||||
};
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user