atom-community / atom-script

:runner: Run ( scripts | selections | source ) in Atom
https://atom.io/packages/script
MIT License
733 stars 269 forks source link

Uncaught TypeError: Cannot read property 'indexOf' of undefined #1363

Open ShadowLNC opened 7 years ago

ShadowLNC commented 7 years ago

[Enter steps to reproduce:]

  1. Start an untitled file
  2. Change the language to Python
  3. Add a basic print("hello, world!") statement
  4. Try to run the file

Atom: 1.18.0 ia32 Electron: 1.3.15 OS: Microsoft Windows 10 Pro Thrown From: script package 3.15.0

Stack Trace

Uncaught TypeError: Cannot read property 'indexOf' of undefined

At C:\Users\Scott\.atom\packages\script\lib\runner.js:166

TypeError: Cannot read property 'indexOf' of undefined
    at Runner.getProjectPath (/packages/script/lib/runner.js:166:19)
    at Runner.getCwd (/packages/script/lib/runner.js:79:22)
    at Runner.options (/packages/script/lib/runner.js:130:17)
    at Runner.run (/packages/script/lib/runner.js:27:26)
    at Runtime.execute (/packages/script/lib/runtime.js:78:17)
    at /packages/script/lib/script.js:98:40)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.18.0/resources/app/src/command-registry.js:265:35)
    at ~/AppData/Local/atom/app-1.18.0/resources/app/src/command-registry.js:3:65
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (~/AppData/Local/atom/app-1.18.0/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:610:22)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (~/AppData/Local/atom/app-1.18.0/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:401:28)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom/app-1.18.0/resources/app/src/window-event-handler.js:100:42)
    at HTMLDocument.<anonymous> (~/AppData/Local/atom/app-1.18.0/resources/app/src/window-event-handler.js:3:65)

Commands

     -0:48.9.0 snippets:next-tab-stop (input.hidden-input)
     -0:48.9.0 snippets:expand (input.hidden-input)
     -0:48.9.0 editor:indent (input.hidden-input)
     -0:46.2.0 command-palette:toggle (input.hidden-input)
     -0:42.8.0 editor:consolidate-selections (input.hidden-input)
     -0:42.8.0 core:cancel (input.hidden-input)
     -0:40.9.0 line-ending-selector:show (atom-text-editor.editor.autocomplete-active.is-focused)
     -0:39.7.0 core:confirm (input.hidden-input)
     -0:37.7.0 grammar-selector:show (atom-text-editor.editor.is-focused)
     -0:36.5.0 core:confirm (input.hidden-input)
  3x -0:31.7.0 core:backspace (input.hidden-input)
  3x -0:28.1.0 core:move-right (input.hidden-input)
  2x -0:24.2.0 editor:newline (input.hidden-input)
     -0:23.6.0 core:backspace (input.hidden-input)
  4x -0:17.8.0 intentions:highlight (input.hidden-input)
     -0:15.5.0 script:run (input.hidden-input)

Non-Core Packages

activate-power-mode 2.0.0 
atom-clock 0.1.9 
build 0.68.0 
busy 0.7.0 
busy-signal 1.4.3 
chester-atom-syntax 0.2.0 
close-tags 0.6.0 
django-atom 0.2.4 
file-icons 2.1.7 
git-time-machine 1.5.9 
highlight-selected 0.13.1 
improved-chester-atom-syntax 0.3.0 
intentions 1.1.2 
linter 2.2.0 
linter-pylama 0.9.3 
linter-ui-default 1.6.1 
minimap 4.28.2 
minimap-autohide 0.10.1 
minimap-autohider 1.5.3 
minimap-bookmarks 0.4.2 
minimap-codeglance 0.4.7 
minimap-cursorline 0.2.0 
minimap-find-and-replace 4.5.2 
minimap-git-diff 4.3.1 
minimap-highlight-selected 4.6.1 
minimap-selection 4.4.0 
minimap-split-diff 0.3.7 
minimap-titles 1.11.0 
python-indent 1.0.3 
script 3.15.0 
split-diff 1.4.1 
dessant commented 7 years ago

I'm having the same issue with unsaved buffers, but while trying to run JS on Atom 1.20.1 with script 3.17.2.