Skip to content

Commit

Permalink
mac git portables
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasLukasczyk committed Dec 1, 2023
1 parent c3de1b0 commit 5cdc6da
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/main/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,15 @@ app.on('window-all-closed', () => {
app.on('activate', restoreOrCreateWindow);

const initCore = async () => {
const PATH = require('path');
if(process.platform === 'win32'){
const PATH = require('path');
const process_path_separator = ';';
// path to GitPortable executables.
process.env['PATH'] += process_path_separator + [process.resourcesPath,'git-binaries','win','cmd'].join(PATH.sep);
} else if(process.platform === 'darwin') {
const process_path_separator = ':';
const architecture = process.arch === 'arm64' ? 'arm64' : 'amd64' ;
process.env['PATH'] += process_path_separator + [process.resourcesPath,'git-binaries','mac',architecture].join(PATH.sep);
}
// ipcMain.handle('CORE.getVersion', ()=>process.env['npm_package_version']);
ipcMain.handle('CORE.getVersion', ()=>app.getVersion());
}

Expand Down

0 comments on commit 5cdc6da

Please sign in to comment.