Commit a7c4f42e authored by NGPixel's avatar NGPixel

fix: Incorrect git remote rm error

parent 5bef1767
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
"connect-mongo": "^1.3.2", "connect-mongo": "^1.3.2",
"cookie-parser": "^1.4.3", "cookie-parser": "^1.4.3",
"cron": "^1.2.1", "cron": "^1.2.1",
"diff2html": "^2.3.0",
"execa": "^0.6.3", "execa": "^0.6.3",
"express": "^4.15.2", "express": "^4.15.2",
"express-brute": "^1.0.1", "express-brute": "^1.0.1",
......
...@@ -221,8 +221,8 @@ module.exports = (port, spinner) => { ...@@ -221,8 +221,8 @@ module.exports = (port, spinner) => {
}, },
() => { () => {
if (req.body.gitUseRemote === false) { return false } if (req.body.gitUseRemote === false) { return false }
return exec.stdout('git', ['remote', 'remove', 'origin'], { cwd: gitDir }).catch(err => { return exec.stdout('git', ['remote', 'rm', 'origin'], { cwd: gitDir }).catch(err => {
if (_.includes(err.message, 'No such remote')) { if (_.includes(err.message, 'No such remote') || _.includes(err.message, 'Could not remove')) {
return true return true
} else { } else {
throw err throw err
......
...@@ -18,6 +18,9 @@ block rootNavRight ...@@ -18,6 +18,9 @@ block rootNavRight
a.button.is-outlined(href='/source/' + pageData.meta.path) a.button.is-outlined(href='/source/' + pageData.meta.path)
i.icon-loader i.icon-loader
span Source span Source
a.button.is-outlined(href='/diff/' + pageData.meta.path)
i.icon-flow-merge
span Diff
if rights.write if rights.write
a.button(href='/edit/' + pageData.meta.path) a.button(href='/edit/' + pageData.meta.path)
i.icon-document-text i.icon-document-text
......
This diff was suppressed by a .gitattributes entry.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment