nguyenchr / atom-cargo-test-runner

Cargo test runner for Atom Editor
https://atom.io/packages/cargo-test-runner
MIT License
5 stars 3 forks source link

Uncaught TypeError: editor.getPath is not a function #16

Open onlyafly opened 6 years ago

onlyafly commented 6 years ago

[Enter steps to reproduce:]

  1. Execute the 'cargo-test-runner:run' command with no files open in Atom.

Atom: 1.29.0 x64 Electron: 2.0.5 OS: Mac OS X 10.13.6 Thrown From: cargo-test-runner package 0.1.0

Stack Trace

Uncaught TypeError: editor.getPath is not a function

At /Users/kevin/.atom/packages/cargo-test-runner/lib/context.coffee:6

TypeError: editor.getPath is not a function
    at Object.exports.find (/packages/cargo-test-runner/lib/context.coffee:6:32)
    at Object.run (/packages/cargo-test-runner/lib/cargo-test-runner.coffee:57:30)
    at /packages/cargo-test-runner/lib/cargo-test-runner.coffee:38:89)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:384:49)
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:621:22)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:412:28)
    at WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:110:40)

Commands

  9x -0:32.8.0 core:close (input.hidden-input)
  5x -0:27 cargo-test-runner:run (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-solarized-light-syntax.theme-atom-light-ui)

Non-Core Packages

atom-ide-ui 0.13.0 
autocomplete 0.47.0 
busy-signal 1.4.3 
cargo-test-runner 0.1.0 
ide-rust 0.18.0 
intentions 1.1.5 
language-rust 0.4.12 
linter 2.2.0 
linter-ui-default 1.7.1 
liquidnight2 commented 4 years ago

I have that issue too. Linux Mint

Atom 1.45.0 x64
Electron 4.2.7 Chrome 69.0.3497.128

# cargo new project Having the main.rs file open, calling Run-Tests from the menu.

liquidnight2 commented 4 years ago

That error still persists.

  1. Have a project open, navigate to source code
  2. Press ctrl-alt-c

Atom: 1.49.0 x64 Electron: 5.0.13 OS: linux 5.4.0-42-generic Thrown From: cargo-test-runner package 0.1.0

Stack Trace

Uncaught TypeError: editor.getPath is not a function

At /home/user/.var/app/io.atom.Atom/data/packages/cargo-test-runner/lib/context.coffee:12

TypeError: editor.getPath is not a function
    at Object.exports.find (/packages/cargo-test-runner/lib/context.coffee:12:34)
    at Object.run (/packages/cargo-test-runner/lib/cargo-test-runner.coffee:89:32)
    at /packages/cargo-test-runner/lib/cargo-test-runner.coffee:59:26)
    at CommandRegistry.handleCommandEvent (/app/share/atom/resources/app/static/<embedded>:11:349781)
    at KeymapManager.dispatchCommandEvent (/app/share/atom/resources/app/static/<embedded>:11:1242286)
    at KeymapManager.handleKeyboardEvent (/app/share/atom/resources/app/static/<embedded>:11:1238420)
    at WindowEventHandler.handleDocumentKeyEvent (/app/share/atom/resources/app/static/<embedded>:11:284830)

Commands

     -5:48.4.0 build:trigger (input.hidden-input)
     -4:25.1.0 cargo-test-runner:run (div.package-detail)

Non-Core Packages

atom-ide-ui 0.13.0 
atom-material-syntax 1.0.8 
atom-material-ui 2.1.3 
build 0.70.0 
build-cargo 2.0.0 
busy-signal 2.0.1 
cargo-test-runner 0.1.0 
ctrl-dir-scroll 0.2.5 
dark-flat-ui 1.2.4 
darker-one-dark-syntax 1.1.0 
deep-purple-syntax 0.2.18 
g-dark-purple-syntax 0.3.1 
g-dark-purple-ui 0.3.0 
ide-rust 0.22.0-beta.3 
linter 2.3.1 
love-dark-syntax 0.1.2 
love-dark-ui 0.1.2 
love-light-syntax 0.1.2 
love-light-ui 0.1.2 
monokai 0.24.0 
nv-dark-ui 3.0.8 
project-manager 3.3.8 
purple-papers-syntax 0.1.1 
purple-rain 0.4.8 
Purple-rain-ui 0.2.0 
purple-sky-syntax 1.0.0 
rzx-dark-ui 1.1.3 
slim-dark-ui 0.12.0 
svn 0.0.14