mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-21 23:18:14 +00:00
dev: Use .env file for Sentry DSN.
Reads .env file in root folder of repo to get Sentry DSN for builds.
This commit is contained in:
committed by
Akash Nimare
parent
95da6c0d58
commit
088ddf9c62
@@ -1,11 +1,14 @@
|
||||
import { init } from '@sentry/electron';
|
||||
|
||||
import isDev = require('electron-is-dev');
|
||||
import path = require('path');
|
||||
import dotenv = require('dotenv');
|
||||
dotenv.config({ path: path.resolve(__dirname, '/../../../../.env') });
|
||||
|
||||
export const sentryInit = (): void => {
|
||||
if (!isDev) {
|
||||
init({
|
||||
dsn: 'SENTRY_DSN',
|
||||
dsn: process.env.SENTRY_DSN,
|
||||
// We should ignore this error since it's harmless and we know the reason behind this
|
||||
// This error mainly comes from the console logs.
|
||||
// This is a temp solution until Sentry supports disabling the console logs
|
||||
|
||||
Reference in New Issue
Block a user