Disable hw accl (#7457)

Allow headless running of tests
This commit is contained in:
Amir Omidi
2019-10-02 14:08:22 -07:00
committed by GitHub
parent 2b8508574d
commit e0a867a184
3 changed files with 21 additions and 14 deletions

View File

@@ -27,6 +27,13 @@ bootstrap.enableASARSupport();
// Set userData path before app 'ready' event and call to process.chdir
const args = parseCLIArgs();
if (args['nogpu']) { // {{SQL CARBON EDIT}}
app.disableHardwareAcceleration(); // {{SQL CARBON EDIT}}
app.commandLine.appendSwitch('headless'); // {{SQL CARBON EDIT}}
app.commandLine.appendSwitch('disable-gpu'); // {{SQL CARBON EDIT}}
} // {{SQL CARBON EDIT}}
const userDataPath = getUserDataPath(args);
app.setPath('userData', userDataPath);