fix: Incorrect git remote rm error
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user