dqsully / dqs-shell-commands

Execute user defined shell commands (from atom-user-commands)
MIT License
2 stars 1 forks source link

Uncaught ReferenceError: path is not defined #4

Closed lemongrassnginger closed 7 years ago

lemongrassnginger commented 7 years ago

[Enter steps to reproduce:]

  1. running a command from ~/.atom/global-shell-commands.cson

The command is available in the command palette. It's only when the command is executed.

Test command I was using opens Windows explorer in the file's current directory. This works from a project-specific .shell-commands.cson file, just a problem with the global cson file.

commands: [
  {
    name: "exp"
    command: "explorer"
    arguments: [
      "."
    ]
    options:
      cwd: "{FileDir}"
  }
]

Atom: 1.15.0 ia32 Electron: 1.3.13 OS: Microsoft Windows 10 Enterprise Thrown From: dqs-shell-commands package 2.2.0

Stack Trace

Uncaught ReferenceError: path is not defined

At C:\Users\sbell\.atom\packages\dqs-shell-commands\lib\dqs-shell-commands.js:228

ReferenceError: path is not defined
    at /packages/dqs-shell-commands/lib/dqs-shell-commands.js:228:92)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at /app.asar/src/command-registry.js:3:59
    at Object.didConfirmSelection (/app.asar/node_modules/command-palette/lib/command-palette-view.js:106:29)
    at SelectListView.confirmSelection (/app.asar/node_modules/atom-select-list/src/select-list-view.js:301:20)
    at HTMLDivElement.coreConfirm (/app.asar/node_modules/atom-select-list/src/select-list-view.js:67:14)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at /app.asar/src/command-registry.js:3:59
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:599:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:390:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/app.asar/src/window-event-handler.js:106:36)
    at /app.asar/src/window-event-handler.js:3:59)

Commands

     -0:47.5.0 command-palette:toggle (input.hidden-input)
     -0:45.5.0 core:confirm (input.hidden-input)
     -0:45.5.0 dqs-shell-commands:exp (input.hidden-input)
  2x -0:40 vim-mode-plus:move-down (input.hidden-input)
     -0:38.4.0 vim-mode-plus:insert-after-end-of-line (input.hidden-input)
     -0:37.6.0 core:move-left (input.hidden-input)
     -0:37.2.0 vim-mode-plus:activate-normal-mode (input.hidden-input)
     -0:36.8.0 core:save (input.hidden-input)
     -0:35.7.0 vim-mode-plus:activate-normal-mode (atom-text-editor.editor.vim-mode-plus.is-focused.normal-mode)
     -0:34 command-palette:toggle (input.hidden-input)
  2x -0:31.3.0 core:move-down (input.hidden-input)
     -0:30.7.0 core:confirm (input.hidden-input)
     -0:30.7.0 dqs-shell-commands:exp2 (input.hidden-input)
     -0:23.6.0 command-palette:toggle (input.hidden-input)
     -0:22.1.0 core:confirm (input.hidden-input)
     -0:22.1.0 dqs-shell-commands:exp (input.hidden-input)

Non-Core Packages

atom-alignment 0.12.1 
atom-html-preview 0.1.22 
atom-keyboard-macros-vim 0.1.6 
atom-terminal 0.8.0 
atom-ternjs 0.16.1 
atomic-chrome 0.3.0 
calc 0.4.0 
character-table 0.4.3 
column-select 0.2.0 
ctrl-dir-scroll 0.2.2 
date 1.1.1 
docblockr 0.9.1 
docs undefined 
dqs-shell-commands 2.2.0 
duplicate-removal 0.1.3 
git-log 0.4.1 
git-plus 7.1.0 
json-converter 0.2.4 
language-abap 1.1.0 
language-diff 0.7.0 
language-latex 1.0.0 
language-mediawiki 2.2.0 
language-vbscript 0.7.0 
last-cursor-position 0.9.0 
linter 1.11.21 
linter-coffeelint 1.2.1 
linter-eslint 8.0.0 
linter-jsonlint 1.3.0 
markdown-scroll-sync 2.1.2 
markdown-themeable-pdf 1.2.0 
markdown-writer 2.6.3 
merge-conflicts 1.4.4 
pdf-view 0.54.0 
project-manager 3.3.3 
simple-panes 1.1.0 
sort-lines 0.14.0 
sorter 0.1.2 
split-diff 1.1.1 
symbol-gen 1.3.1 
tablr 1.8.1 
tabs-to-spaces 1.0.3 
terminal-status 1.6.8 
vim-mode 0.66.0 
vim-mode-plus 0.82.0 
vim-mode-plus-keymaps-for-surround 0.2.1 
vim-surround 0.8.1 
dqsully commented 7 years ago

Interesting... I tested this and had no problems. Anyway it should be fixed now, and there was indeed a typo. I'll leave this one open until you can confirm that the problem is fixed, however.

Thanks again.

lemongrassnginger commented 7 years ago

nice work :) +1