mirror of
https://github.com/S2-/gitlit
synced 2025-08-02 20:30:05 +02:00
parse command line correctly when packages
This commit is contained in:
10
app/main.js
10
app/main.js
@@ -3,7 +3,7 @@ const path = require('path');
|
|||||||
const url = require('url');
|
const url = require('url');
|
||||||
const electronLocalshortcut = require('electron-localshortcut');
|
const electronLocalshortcut = require('electron-localshortcut');
|
||||||
const exec = require('child_process').exec;
|
const exec = require('child_process').exec;
|
||||||
const args = require('minimist')(process.argv.slice(2), {
|
const args = require('minimist')(process.defaultApp ? process.argv.slice(2) : process.argv.slice(1), {
|
||||||
default: {
|
default: {
|
||||||
_: process.cwd()
|
_: process.cwd()
|
||||||
}
|
}
|
||||||
@@ -98,7 +98,7 @@ function createWindow() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
win.webContents.on('did-finish-load', () => {
|
win.webContents.on('did-finish-load', () => {
|
||||||
console.log('getting file list and lock status...');
|
console.log('getting file list and lock status in ' + repoDir + '...');
|
||||||
|
|
||||||
getLfsFileList(repoDir, (err, files) => {
|
getLfsFileList(repoDir, (err, files) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
@@ -178,3 +178,9 @@ ipcMain.on('lock', (event, file) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.on('ready', createWindow);
|
app.on('ready', createWindow);
|
||||||
|
|
||||||
|
app.on('window-all-closed', function() {
|
||||||
|
if (process.platform != 'darwin') {
|
||||||
|
app.quit();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Reference in New Issue
Block a user