geksilla/atom-fuzzy-grep

Uncaught TypeError: Cannot read property 'repo' of null

nosami opened this issue · 2 comments

[Enter steps to reproduce below:]

  1. ...Launch atom-fuzzy-grep
  2. ...Start typing

Atom Version: 0.200.0
System: Mac OS X 10.10.3
Thrown From: atom-fuzzy-grep package, v0.1.0

Stack Trace

Uncaught TypeError: Cannot read property 'repo' of null

At /Users/jason/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:683

TypeError: Cannot read property 'repo' of null
  at /Users/jason/.atom/packages/atom-fuzzy-grep/lib/runner.coffee:64:9
  at Array.some (native)
  at Runner.module.exports.Runner.isGitRepo (/Users/jason/.atom/packages/atom-fuzzy-grep/lib/runner.coffee:63:33)
  at Runner.module.exports.Runner.run (/Users/jason/.atom/packages/atom-fuzzy-grep/lib/runner.coffee:18:27)
  at GrepView.module.exports.GrepView.grepProject (/Users/jason/.atom/packages/atom-fuzzy-grep/lib/atom-fuzzy-grep-view.coffee:66:13)
  at /Users/jason/.atom/packages/atom-fuzzy-grep/lib/atom-fuzzy-grep-view.coffee:15:8
  at Emitter.module.exports.Emitter.emit (/Users/jason/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at TextBuffer.module.exports.TextBuffer.applyChange (/Users/jason/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:556:20)
  at TextBuffer.module.exports.TextBuffer.setTextInRange (/Users/jason/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:470:12)
  at Selection.module.exports.Selection.insertText (/Users/jason/Downloads/Atom.app/Contents/Resources/app.asar/src/selection.js:452:43)
  at /Users/jason/Downloads/Atom.app/Contents/Resources/app.asar/src/text-editor.js:729:31
  at /Users/jason/Downloads/Atom.app/Contents/Resources/app.asar/src/text-editor.js:771:29
  at TextBuffer.module.exports.TextBuffer.transact (/Users/jason/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:678:18)
  at TextEditor.module.exports.TextEditor.transact (/Users/jason/Downloads/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1132:26)
  at /Users/jason/Downloads/Atom.app/Contents/Resources/app.asar/src/text-editor.js:765:24
  at TextEditor.module.exports.TextEditor.mergeSelections (/Users/jason/Downloads/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1954:18)
  at TextEditor.module.exports.TextEditor.mergeIntersectingSelections (/Users/jason/Downloads/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1924:35)
  at TextEditor.module.exports.TextEditor.mutateSelectedText (/Users/jason/Downloads/Atom.app/Contents/Resources/app.asar/src/text-editor.js:763:19)
  at TextEditor.module.exports.TextEditor.insertText (/Users/jason/Downloads/Atom.app/Contents/Resources/app.asar/src/text-editor.js:726:21)
  at /Users/jason/Downloads/Atom.app/Contents/Resources/app.asar/src/text-editor-component.js:442:31
  at TextBuffer.module.exports.TextBuffer.transact (/Users/jason/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:678:18)
  at TextEditor.module.exports.TextEditor.transact (/Users/jason/Downloads/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1132:26)
  at TextEditorComponent.module.exports.TextEditorComponent.onTextInput (/Users/jason/Downloads/Atom.app/Contents/Resources/app.asar/src/text-editor-component.js:440:35)
  at HTMLDivElement.<anonymous> (/Users/jason/Downloads/Atom.app/Contents/Resources/app.asar/src/text-editor-component.js:3:61)

Commands

     -0:05.9.0 fuzzy-grep:toggle (atom-text-editor.editor.vim-mode.command-mode.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "metrics",
      "autocomplete",
      "web-browser"
    ],
    "ignoredNames": [
      ".git",
      ".svn",
      ".DS_Store"
    ],
    "themes": [
      "atom-dark-ui",
      "gruvbox"
    ]
  }
}

Installed Packages

# User
.bin, vundefined
atom-browser-webview, v0.6.0
atom-fuzzy-grep, v0.1.0
atom-typescript, v4.5.0
atom-yeoman, v0.2.0
editor-background, v0.13.0
gruvbox, v0.3.2
language-csharp, v0.5.0
linter, v0.12.6
omnisharp-atom, v0.6.1
vim-mode, v0.48.0

# Dev
No dev packages

I think this is because the folder isn't a git repo and it's trying to use git-grep? I do have Ag installed, so it should use that in this case.

@nosami, thanks for report i'll take a look