Skip to content

Commit

Permalink
fix(cli): Trim whitespace from git remote.
Browse files Browse the repository at this point in the history
  • Loading branch information
tgetgood committed Nov 2, 2017
1 parent 9eda326 commit d924d75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ const shellOut = command =>

const gitConfigCommand = 'git config --get remote.origin.url'

const parseGitURL = new RegExp('.*github\\.com[:/]([^/]+)\\/(.+)\\n?$')
const parseGitURL = new RegExp('.*github\\.com[:/]([^/]+)\\/(.+)$')

const getCurrentRepoInfo = () => shellOut(gitConfigCommand)
.then(x => parseGitURL.exec(x))
.then(x => parseGitURL.exec(x.trim()))
.then(x => {
let repo = x[2]
if (repo.endsWith('.git')) {
Expand Down

0 comments on commit d924d75

Please sign in to comment.