Browse Source

Check if path is a repo path via regex

master
Leo Lamprecht 8 years ago
parent
commit
bb74c71896
No known key found for this signature in database GPG Key ID: B08517883D5E0E10
  1. 8
      lib/github.js

8
lib/github.js

@ -56,13 +56,7 @@ export const isRepoPath = path => {
return false
}
const slashCount = path.split('/').length - 1
if (!slashCount || slashCount > 1) {
return false
}
return true
return /[^\s\\]\/[^\s\\]/g.test(path)
}
export const onGitHub = async (path, debug) => {

Loading…
Cancel
Save