Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 557a651

Browse files
committed
Refactor out require open
1 parent 249f602 commit 557a651

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

main.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ var fs = require('fs'),
1818
tray = require('tray'),
1919
ini = require('ini'),
2020
dialog = require('dialog'),
21-
ipcMain = require('ipc-main');
21+
ipcMain = require('ipc-main')
22+
open = require('open');
2223

2324
var launched_from_installer = false;
2425
var platform = os.platform();
@@ -560,7 +561,7 @@ app.on('ready', function() {
560561
'There was an error and we are unable to open the server debug log at this time.\n\n' + err);
561562
}
562563

563-
require('open')(debugPath);
564+
open(debugPath);
564565
});
565566
}},
566567
{label: 'Send Debug Package', type: 'normal', click: function() {
@@ -573,15 +574,15 @@ app.on('ready', function() {
573574
body += 'Debug Log:\n';
574575
body += serverOut;
575576

576-
require('open')('mailto:[email protected]?subject=OpenBazaar Debug Report&body=' + body);
577+
open('mailto:[email protected]?subject=OpenBazaar Debug Report&body=' + body);
577578

578579
}}
579580
];
580581

581582
if(launched_from_installer) {
582583
template.push({label: 'View Python Error Log', type: 'normal', click: function() {
583584
var logPath = __dirname + path.sep + 'python_error.log';
584-
require('open')(logPath);
585+
open(logPath);
585586
}});
586587
}
587588

0 commit comments

Comments
 (0)