<commit_before>import path from 'path';
import fs from 'fs';
import crypto from 'crypto';
import { promisify } from 'util';
import execa from 'execa';
import { app, ipcMain } from 'electron';
import electronUtil from 'electron-util';
import electronDebug from 'electron-debug';
import createMenubar from 'menubar';
import invariant from 'invariant';
import stringToColor from 'string-to-color';
import treeKill from 'tree-kill';
import fixPath from 'fix-path';
import createNotification from '~/common/notification';
import createStore from '~/common/preferences-store';
import Channels from '~/common/channels';
import menubarIcon from '~/assets/menubarTemplate.png';
import '~/assets/menubarTemplate@2x.png';

// Setup test-related stuff until more elegant soultion is found
if (global.process.env.NODE_ENV === 'test') {
  // Point userData to temp directory
  app.setPath('userData', app.getPath('temp'));
  // Make sure visual snapshots are the same on CI
  app.commandLine.appendSwitch('high-dpi-support', 'true');
  app.commandLine.appendSwitch('force-device-scale-factor', '2');
}

fixPath();
electronDebug();

const isDev = process.env.NODE_ENV === 'development';
const preferences = createStore(true);<commit_msg>fix: apply path fix only in prodcution<commit_after>import path from 'path';
import fs from 'fs';
import crypto from 'crypto';
import { promisify } from 'util';
import execa from 'execa';
import { app, ipcMain } from 'electron';
import electronUtil from 'electron-util';
import electronDebug from 'electron-debug';
import createMenubar from 'menubar';
import invariant from 'invariant';
import stringToColor from 'string-to-color';
import treeKill from 'tree-kill';
import fixPath from 'fix-path';
import createNotification from '~/common/notification';
import createStore from '~/common/preferences-store';
import Channels from '~/common/channels';
import menubarIcon from '~/assets/menubarTemplate.png';
import '~/assets/men<EMAIL>';

// Setup test-related stuff until more elegant soultion is found
if (global.process.env.NODE_ENV === 'test') {
  // Point userData to temp directory
  app.setPath('userData', app.getPath('temp'));
  // Make sure visual snapshots are the same on CI
  app.commandLine.appendSwitch('high-dpi-support', 'true');
  app.commandLine.appendSwitch('force-device-scale-factor', '2');
}

if (electronUtil.is.development) {
  electronDebug();
} else {
  fixPath();
}

const isDev = process.env.NODE_ENV === 'development';
const preferences = createStore(true);
{'fraction_non_alphanumeric': 0.13282808137215796, 'fraction_numerical': 0.0011966493817311527, 'mean_word_length': 5.652519893899204, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '770711', 'n_tokens_mistral': 757, 'n_tokens_neox': 727, 'n_words': 232}