From dddd625954fbc24ef846655b8a23f18daa719674 Mon Sep 17 00:00:00 2001 From: Oj Date: Fri, 28 Jan 2022 20:52:45 +0000 Subject: [PATCH] [Argv] Remove lib as unneeded --- src/bootstrap.js | 5 ++--- src/utils/argv.js | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 src/utils/argv.js diff --git a/src/bootstrap.js b/src/bootstrap.js index b54106d..f18b912 100644 --- a/src/bootstrap.js +++ b/src/bootstrap.js @@ -12,7 +12,6 @@ log('Bootstrap', 'Forcing Electron props'); app.name = 'discord'; // Force name as sometimes breaks data path even with "discord" name (also fixes kernel?) const requireNative = require('./utils/requireNative'); -const argv = require('./utils/argv'); const paths = require('./paths'); global.moduleDataPath = paths.getModuleDataPath(); // Global because discord @@ -100,7 +99,7 @@ const startCore = () => { }; const startUpdate = () => { - const startMinimized = argv.hasFlag('--start-minimized'); + const startMinimized = process.argv.includes('--start-minimized'); log('Bootstrap', 'Start minimized:', startMinimized); appUpdater.update(startMinimized, () => { @@ -139,7 +138,7 @@ getModuleDataPath: ${paths.getModuleDataPath()} getInstallPath: ${paths.getInstallPath()}`); const instanceLock = app.requestSingleInstanceLock(); - const allowMultiInstance = argv.hasFlag('--multi-instance') || oaConfig.multiInstance === true; // argv flag or config + const allowMultiInstance = process.argv.includes('--multi-instance') || oaConfig.multiInstance === true; // argv flag or config console.log(instanceLock, allowMultiInstance); diff --git a/src/utils/argv.js b/src/utils/argv.js deleted file mode 100644 index c68490e..0000000 --- a/src/utils/argv.js +++ /dev/null @@ -1 +0,0 @@ -exports.hasFlag = (flag) => process.argv.includes(flag); \ No newline at end of file