karan / atom-terminal

Atom package to open terminal on current file's directory with "ctrl-shift-t"
https://atom.io/packages/atom-terminal
MIT License
70 stars 30 forks source link

Uncaught TypeError: Cannot read property 'file' of undefined #19

Closed fxleblanc closed 9 years ago

fxleblanc commented 9 years ago
  1. Installed atom using the rpm package on fedora 20
  2. Installed the atom-terminal package using the settings view
  3. Used the shortcut Ctrl-Shift-t

Atom Version: 0.165.0 System: linux 3.17.7-200.fc20.x86_64 Thrown From: atom-terminal package, v0.6.0

Stack Trace

Uncaught TypeError: Cannot read property 'file' of undefined

At /home/pprince/.atom/packages/atom-terminal/lib/atom-terminal.coffee:49

TypeError: Cannot read property 'file' of undefined
  at Object.module.exports.open (/home/pprince/.atom/packages/atom-terminal/lib/atom-terminal.coffee:49:30)
  at atom-workspace.<anonymous> (/home/pprince/.atom/packages/atom-terminal/lib/atom-terminal.coffee:45:62)
  at atom-workspace.handler (/usr/local/share/atom/resources/app/src/space-pen-extensions.js:115:32)
  at atom-workspace.jQuery.event.dispatch (/usr/local/share/atom/resources/app/node_modules/space-pen/vendor/jquery.js:4681:9)
  at atom-workspace.elemData.handle (/usr/local/share/atom/resources/app/node_modules/space-pen/vendor/jquery.js:4359:46)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/local/share/atom/resources/app/src/command-registry.js:243:29)
  at /usr/local/share/atom/resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/local/share/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:549:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/local/share/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:391:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/usr/local/share/atom/resources/app/src/window-event-handler.js:167:20)

Commands

  6x -1:11.7 core:move-down (input.hidden-input)
  7x -1:07.8 core:move-up (input.hidden-input)
  2x -1:05.7 core:move-down (input.hidden-input)
     -1:03.6 core:confirm (input.hidden-input)
     -1:03.6 settings-view:install-packages (input.hidden-input)
     -0:56.2 core:select-all (input.hidden-input)
     -0:56.1 core:backspace (input.hidden-input)
     -0:54.7 core:confirm (input.hidden-input)
     -0:35.9 core:select-all (input.hidden-input)
  2x -0:34.6 core:confirm (input.hidden-input)
     -0:23.5 core:select-all (input.hidden-input)
     -0:20.8 core:confirm (input.hidden-input)
     -0:04.3 command-palette:toggle (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-atom-dark-ui)
     -0:01.1 editor:consolidate-selections (input.hidden-input)
     -0:01.1 core:cancel (input.hidden-input)
     -0:00.0 atom-terminal:open (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-atom-dark-ui)

Config

{}

Installed Packages

# User
No installed packages

# Dev
No dev packages

/cc @atom/core

avoliva commented 9 years ago

This happens when you attempt to open the terminal in the settings view. It attempts to open the terminal at the path of the current working directory but fails because you're in the settings view.

fxleblanc commented 9 years ago

Thanks. I tried it on my computer and configured my settings to use gnome-terminal instead of the default one. It seems to have worked that way.