<commit_before>#!/bin/sh

while getopts ":fhtvw-:" opt; do
  case "$opt" in
    -)
      case "${OPTARG}" in
        wait)
          WAIT=1
          EXPECT_OUTPUT=1
          ;;
        help|version)
          REDIRECT_STDERR=1
          EXPECT_OUTPUT=1
          ;;
        foreground|test)
          EXPECT_OUTPUT=1
          ;;
      esac
      ;;
    w)
      WAIT=1
      EXPECT_OUTPUT=1
      ;;
    h|v)
      REDIRECT_STDERR=1
      EXPECT_OUTPUT=1
      ;;
    f|t)
      EXPECT_OUTPUT=1
      ;;
  esac
done

directory=$(dirname "$0")

if [ $EXPECT_OUTPUT ]; then
  export ELECTRON_ENABLE_LOGGING=1
  if [ $WAIT == 'YES' ]; then
    powershell -noexit "%~dp0\..\..\atom.exe" --pid=$pid "$@" ; 
wait-event
  else
    "$directory/../../atom.exe" "$@"
  fi
else
  "$directory/../app/apm/bin/node.exe" "$directory/atom.js" "$@"
fi<commit_msg>More reliable to just call atom.cmd for Cygwin<commit_after>#!/bin/sh
$(dirname "$0")/atom.cmd "$@"
{'fraction_non_alphanumeric': 0.16350210970464135, 'fraction_numerical': 0.014767932489451477, 'mean_word_length': 1.858433734939759, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, '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': '6921046', 'n_tokens_mistral': 368, 'n_tokens_neox': 348, 'n_words': 63}