mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-19 06:58:26 +03:00
No side-effects for --benchmark, --benchmark-test
These options were still causing minor tweaks to startup behavior. Eliminate the behavior differences for these flags during startup.
This commit is contained in:
parent
7b317b2728
commit
de351f1a94
@ -167,8 +167,6 @@ module.exports = class AtomApplication extends EventEmitter {
|
||||
if (
|
||||
!socketPath ||
|
||||
options.test ||
|
||||
options.benchmark ||
|
||||
options.benchmarkTest ||
|
||||
(process.platform !== 'win32' && !fs.existsSync(socketPath))
|
||||
) {
|
||||
return createApplication(options);
|
||||
@ -237,7 +235,7 @@ module.exports = class AtomApplication extends EventEmitter {
|
||||
this.storageFolder = new StorageFolder(process.env.ATOM_HOME);
|
||||
this.autoUpdateManager = new AutoUpdateManager(
|
||||
this.version,
|
||||
options.test || options.benchmark || options.benchmarkTest,
|
||||
options.test,
|
||||
this.config
|
||||
);
|
||||
|
||||
@ -266,7 +264,7 @@ module.exports = class AtomApplication extends EventEmitter {
|
||||
);
|
||||
|
||||
let socketServerPromise;
|
||||
if (options.test || options.benchmark || options.benchmarkTest) {
|
||||
if (options.test) {
|
||||
socketServerPromise = Promise.resolve();
|
||||
} else {
|
||||
socketServerPromise = this.listenForArgumentsFromNewProcess();
|
||||
@ -307,7 +305,7 @@ module.exports = class AtomApplication extends EventEmitter {
|
||||
let optionsForWindowsToOpen = [];
|
||||
let shouldReopenPreviousWindows = false;
|
||||
|
||||
if (options.test || options.benchmark || options.benchmarkTest) {
|
||||
if (options.test) {
|
||||
optionsForWindowsToOpen.push(options);
|
||||
} else if (options.newWindow) {
|
||||
shouldReopenPreviousWindows = false;
|
||||
|
@ -58,7 +58,7 @@ if (args.resourcePath) {
|
||||
devResourcePath = stableResourcePath;
|
||||
}
|
||||
|
||||
if (args.dev || args.test || args.benchmark || args.benchmarkTest) {
|
||||
if (args.dev || args.test) {
|
||||
resourcePath = devResourcePath;
|
||||
} else {
|
||||
resourcePath = stableResourcePath;
|
||||
|
@ -105,7 +105,7 @@ module.exports = function start(resourcePath, devResourcePath, startTime) {
|
||||
|
||||
if (args.userDataDir != null) {
|
||||
app.setPath('userData', args.userDataDir);
|
||||
} else if (args.test || args.benchmark || args.benchmarkTest) {
|
||||
} else if (args.test) {
|
||||
app.setPath('userData', temp.mkdirSync('atom-test-data'));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user