fix: Incorrect git remote rm error

This commit is contained in:
NGPixel
2017-04-30 00:49:26 -04:00
parent 5bef17674d
commit a7c4f42ef0
4 changed files with 36 additions and 9 deletions

View File

@@ -221,8 +221,8 @@ module.exports = (port, spinner) => {
},
() => {
if (req.body.gitUseRemote === false) { return false }
return exec.stdout('git', ['remote', 'remove', 'origin'], { cwd: gitDir }).catch(err => {
if (_.includes(err.message, 'No such remote')) {
return exec.stdout('git', ['remote', 'rm', 'origin'], { cwd: gitDir }).catch(err => {
if (_.includes(err.message, 'No such remote') || _.includes(err.message, 'Could not remove')) {
return true
} else {
throw err

View File

@@ -18,6 +18,9 @@ block rootNavRight
a.button.is-outlined(href='/source/' + pageData.meta.path)
i.icon-loader
span Source
a.button.is-outlined(href='/diff/' + pageData.meta.path)
i.icon-flow-merge
span Diff
if rights.write
a.button(href='/edit/' + pageData.meta.path)
i.icon-document-text