nakajima / atom-branch-status

Atom plugin to show current branch status
https://atom.io/packages/branch-status
MIT License
1 stars 3 forks source link

Uncaught TypeError: Cannot read property 'match' of null #13

Open Athius opened 9 years ago

Athius commented 9 years ago

Hi, I'm new in atom and I just installed your package.

When I open a file of my project, I have the following error that appears. Hope that help you to fix this error.

Atom Version: 0.210.0 System: Mac OS X 10.10.3 Thrown From: branch-status package, v0.8.1

Stack Trace

Uncaught TypeError: Cannot read property 'match' of null

At /myHome/.atom/packages/branch-status/lib/SimpleGitHubFile.coffee:97

TypeError: Cannot read property 'match' of null
  at SimpleGitHubFile.module.exports.SimpleGitHubFile.githubRepoUrl (/myHome/.atom/packages/branch-status/lib/SimpleGitHubFile.coffee:97:11)
  at getNameWithOwner (/myHome/.atom/packages/branch-status/lib/branch-status.coffee:15:54)
  at findPR (/myHome/.atom/packages/branch-status/lib/branch-status.coffee:36:33)

Commands

     -2:19.9.0 core:save (atom-text-editor.editor.is-focused)
     -2:14 command-palette:toggle (atom-text-editor.editor.is-focused)
     -2:11.2.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -2:11.2.0 git-plus:add (atom-text-editor.editor)
     -2:07.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -2:03.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -2:03.3.0 git-plus:commit (atom-text-editor.editor)
  2x -1:58.5.0 core:backspace (atom-text-editor.editor.is-focused)
     -1:53.6.0 core:save (atom-text-editor.editor.is-focused)
     -1:51.8.0 core:close (atom-text-editor.editor.is-focused)
     -1:41.2.0 command-palette:toggle (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)
     -1:37 core:confirm (atom-text-editor.editor.mini.is-focused)
     -1:37 git-plus:new-branch (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)
     -1:30.5.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -1:18 settings-view:open (atom-pane.pane.active)
     -1:12.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {},
  "branch-status": {}
}

Installed Packages

# User
atom-terminal-panel, v4.4.4
auto-detect-indentation, v0.4.2
auto-indent, v0.5.0
autocomplete-clang, v0.7.0
autocomplete-glsl, v0.2.3
autocomplete-paths, v1.0.2
autocomplete-php, v0.3.6
autocomplete-plus-python-jedi, v0.3.6
autocomplete-ruby, v0.1.0
branch-status, v0.8.1
color-picker, v2.0.7
docblockr, v0.7.2
emacs-flow, v0.1.0
git-log, v0.4.1
git-plus, v5.1.7
language-cmake, v0.1.4
language-latex, v0.6.1
latex, v0.24.2
linter, v0.12.7
linter-cpplint, v0.1.4
linter-ruby, v0.1.6
linter-tidy, v1.0.1
minimap, v4.10.0
minimap-git-diff, v4.1.3
ruby-define-method, v0.2.1
texlicious, v0.4.3

# Dev
No dev packages
maddox commented 9 years ago

Well now. I guess it can't make a request to the GitHub repo if the project isn't one.

@Athius Is this project even in a git repo?

We should probably be checking for both, heh.

Athius commented 9 years ago

Sorry for the late answer...

I just made a git init and create an empty ruby file. When I opened this file with atom, I had this error.

I didn't put my project on GitHub repo yet because there is nothing much important in it.

ambo commented 9 years ago

I got the same error on a local git repository. When I publish my repo on Github everything works well. So yes, checking for the repo might be a good idea :)

swharrell commented 9 years ago

Same here. Running local repo and receiving this same error.

Atom Version: 1.0.6

System: Microsoft Windows 7 Enterprise Thrown From: branch-status package, v0.8.1

Stack Trace

Uncaught TypeError: Cannot read property 'match' of null

At C:\Users\myProfile\.atom\packages\branch-status\lib\SimpleGitHubFile.coffee:97

TypeError: Cannot read property 'match' of null
    at SimpleGitHubFile.module.exports.SimpleGitHubFile.githubRepoUrl (C:\Users\myProfile\.atom\packages\branch-status\lib\SimpleGitHubFile.coffee:120:14)
    at getNameWithOwner (C:\Users\myProfile\.atom\packages\branch-status\lib\branch-status.coffee:23:56)
    at findPR (C:\Users\myProfile\.atom\packages\branch-status\lib\branch-status.coffee:48:27)

Commands

     -0:14.5.0 branch-status:toggle (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "projectHome": "S:\\"
  },
  "branch-status": {}
}

Installed Packages

# User
autoclose-html, v0.18.0
branch-status, v0.8.1
highlight-selected, v0.10.1
linter, v1.3.4
minimap, v4.12.3
minimap-highlight-selected, v4.3.0
simple-drag-drop-text, v0.2.3

# Dev
No dev packages

I really like the features this package offers but, I'm going to have to disable it for now.