mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-01-29 15:43:58 +00:00
Check if we are on develop version and don't send reports
This commit is contained in:
parent
3db58dfe7c
commit
116b164da2
13
main.js
13
main.js
@ -18,7 +18,14 @@ let serverProc = null;
|
||||
|
||||
let isWin = /^win/.test(process.platform);
|
||||
|
||||
|
||||
const createServerProc = () => {
|
||||
const directory = path.join(__dirname, 'dist');
|
||||
|
||||
if (!fs.existsSync(directory)) {
|
||||
return;
|
||||
}
|
||||
|
||||
fs.readdir(path.join(__dirname, 'dist'), (err, files) => {
|
||||
var serverPath = null;
|
||||
|
||||
@ -45,8 +52,10 @@ const createServerProc = () => {
|
||||
}
|
||||
|
||||
const exitServerProc = () => {
|
||||
serverProc.kill();
|
||||
serverProc = null;
|
||||
if(serverProc) {
|
||||
serverProc.kill();
|
||||
serverProc = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
13
sentry.js
13
sentry.js
@ -1,8 +1,15 @@
|
||||
const { SentryClient } = require('@sentry/electron');
|
||||
var fs = require('fs');
|
||||
|
||||
const DSN =
|
||||
'https://cb7b474b2e874afb8e400c47d1452ecc:7876224cbff543d992cb0ac4021962f8@sentry.io/1040940';
|
||||
|
||||
SentryClient.create({
|
||||
dsn: DSN
|
||||
});
|
||||
const isDev = () => {
|
||||
return fs.existsSync('.git');
|
||||
};
|
||||
|
||||
if (!isDev()) {
|
||||
SentryClient.create({
|
||||
dsn: DSN
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user