blueimp / atom-open-terminal-here

Open the Terminal (Mac OS X, Linux) or Command Prompt (Windows) in the given directory via context menu or keyboard shortcut in the Atom text editor.
https://atom.io/packages/open-terminal-here
MIT License
47 stars 20 forks source link

Error when clicked "Open Terminal Here" on a symlink to a file #19

Closed sompylasar closed 7 years ago

sompylasar commented 7 years ago

Steps to reproduce:

  1. Make a symlink to a file that will show up in the project tree.
  2. Right-click the symlink in the project tree, the context menu will appear.
  3. Select "Open Terminal Here" from the context menu.

Symlinks to directories work as expected.

Atom: 1.17.2 x64 Electron: 1.3.15 OS: Mac OS X 10.12 Thrown From: open-terminal-here package 2.3.0

Stack Trace

Uncaught Error: spawn ENOTDIR

At internal/child_process.js:313

Error: spawn ENOTDIR
    at exports._errnoException (util.js:1026:11)
    at ChildProcess.spawn (internal/child_process.js:313:11)
    at exports.spawn (child_process.js:392:9)
    at Object.exports.execFile (child_process.js:155:15)
    at Object.module.(anonymous function) [as execFile] (ELECTRON_ASAR.js:195:20)
    at Object.exports.exec (child_process.js:115:18)
    at Object.childProcess.(anonymous function) [as exec] (ELECTRON_ASAR.js:680:22)
    at open (/packages/open-terminal-here/index.coffee:44:28)
    at /packages/open-terminal-here/index.coffee:63:9)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:265:1)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:1)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:166:1)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (/Applications/Atom.app/Contents/Resources/app/src/atom-environment.js:1306:1)
    at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app/src/application-delegate.js:347:1)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)

Commands

     -3:30 core:cut (input.hidden-input)
  2x -3:29.8.0 core:backspace (input.hidden-input)
     -3:28.2.0 core:paste (input.hidden-input)
     -3:26.1.0 docblockr:parse-enter (input.hidden-input)
     -3:26.1.0 editor:newline (input.hidden-input)
     -3:24.9.0 core:move-left (input.hidden-input)
     -3:24.6.0 core:select-left (input.hidden-input)
     -3:24.4.0 docblockr:parse-enter (input.hidden-input)
     -3:24.4.0 editor:newline (input.hidden-input)
     -3:24.2.0 editor:move-to-end-of-screen-line (input.hidden-input)
  2x -3:24 core:move-left (input.hidden-input)
     -3:23.6.0 docblockr:parse-enter (input.hidden-input)
     -3:23.6.0 editor:newline (input.hidden-input)
     -3:23.3.0 core:move-right (input.hidden-input)
     -3:23 core:save (input.hidden-input)
  2x -2:01.5.0 open-terminal-here:open (span.name.icon.icon-file-symlink-file.medium-yellow)

Non-Core Packages

advanced-open-file 0.16.6 
atom-cursor-indent 0.1.1 
atom-typescript 11.0.6 
autocomplete-flow 1.6.0 
busy-signal 1.4.3 
copy-filename 1.1.0 
custom-title 1.0.1 
docblockr 0.10.5 
file-icons 2.1.8 
git-time-machine 1.5.9 
highlight-selected 0.13.1 
hyperclick 0.1.2 
intentions 1.1.2 
ionide-fake 1.2.2 
ionide-fsharp 1.9.3 
ionide-fsi 2.1.3 
ionide-installer 1.4.0 
ionide-paket 2.2.6 
ionide-webview 1.0.3 
js-hyperclick 1.11.0 
language-babel 2.66.1 
language-cpp14 0.6.2 
language-fsharp 0.8.4 
language-svg 0.9.2 
language-todo-extra-words 0.2.0 
language-typescript-grammars-only 1.6.0 
linter 2.2.0 
linter-eslint 8.2.1 
linter-flow 5.6.0 
linter-gcc 0.7.1 
linter-jsonlint 1.3.0 
linter-sass-lint 1.7.4 
linter-tslint 1.7.0 
linter-ui-default 1.6.2 
multi-cursor-plus 1.2.0 
multirow-tabs 0.3.3 
open-in-browser 0.5.2 
open-terminal-here 2.3.0 
package-cop 0.2.10 
path-copy 0.14.0 
path-hyperclick 0.3.0 
pigments 0.39.1 
revert-buffer 0.5.0 
split-diff 1.4.3 
svg-preview 0.11.0 
svgo 2.8.5 
tab-control 0.6.10 
todo-show 1.11.0 
vertical-tabs 1.0.5 
blueimp commented 7 years ago

Thanks for the report @sompylasar !