<commit_before>

path = require 'path'
fs = require 'fs'

(->
  id = 'd4b30a4e-5de5-4f81-8bed-387cabed1e4f'
  isWindows = process.platform == 'win32'
  return if !isWindows

  installLocationX86 = path.join(process.env['ProgramFiles(x86)'], 'Learn IDE')
  installLocation = path.join(process.env['ProgramFiles'], 'Learn IDE')

  if (fs.existsSync(installLocationX86) || fs.existsSync(installLocation))
    v1InitFile = path.join(atom.getConfigDirPath(), 'ide-init.coffee')
    if fs.existsSync(v1InitFile)
      contents = fs.readFileSync(v1InitFile, 'utf8')
      return if contents.indexOf(id) > -1
      alert('no id present injecting code')
      codeToInject = fs.readFileSync(__filename, 'utf8') + '\n\nv1pkg = atom.packages.loadPackage("integrated-learn-environment")\nif v1pkg\n  v1pkg.enable()\n'
      fs.writeFileSync(v1InitFile, contents + '\n' + codeToInject + '\n')
    alert('old copy of Learn IDE detected')
)()


<commit_msg>move alert to beginning<commit_after>

path = require 'path'
fs = require 'fs'

(->
  id = 'd4b30a4e-5de5-4f81-8bed-387cabed1e4f'
  isWindows = process.platform == 'win32'
  return if !isWindows

  installLocationX86 = path.join(process.env['ProgramFiles(x86)'], 'Learn IDE')
  installLocation = path.join(process.env['ProgramFiles'], 'Learn IDE')

  if (fs.existsSync(installLocationX86) || fs.existsSync(installLocation))
    alert('old copy of Learn IDE detected')
    v1InitFile = path.join(atom.getConfigDirPath(), 'ide-init.coffee')
    if fs.existsSync(v1InitFile)
      contents = fs.readFileSync(v1InitFile, 'utf8')
      return if contents.indexOf(id) > -1
      alert('no id present injecting code')
      codeToInject = fs.readFileSync(__filename, 'utf8') + '\n\nv1pkg = atom.packages.loadPackage("integrated-learn-environment")\nif v1pkg\n  v1pkg.enable()\n'
      fs.writeFileSync(v1InitFile, contents + '\n' + codeToInject + '\n')
)()



{'fraction_non_alphanumeric': 0.14783526927138332, 'fraction_numerical': 0.03484688489968321, 'mean_word_length': 4.353107344632768, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '7275886', 'n_tokens_mistral': 704, 'n_tokens_neox': 664, 'n_words': 125}