mirror of
https://github.com/aljazceru/gitpear.git
synced 2025-12-17 22:24:22 +01:00
@@ -49,12 +49,13 @@ module.exports = class RPC {
|
||||
// TODO: check ACL
|
||||
// collect stdout to buffer and return it
|
||||
return await new Promise((resolve, reject) => {
|
||||
const process = spawn('git', ['pull', url, `${branch}:${branch}`], { env: { GIT_DIR: home.getCodePath(repo) } })
|
||||
const process = spawn('git', ['fetch', url, `${branch}:${branch}`], { env: { GIT_DIR: home.getCodePath(repo) } })
|
||||
//let outBuffer = Buffer.from('')
|
||||
// process.stdout.on('data', data => {
|
||||
// console.error('data:', JSON.stringify(data.toString()))
|
||||
// outBuffer = Buffer.concat([outBuffer, data])
|
||||
// })
|
||||
console.error('ARGS:'. process.argv)
|
||||
let errBuffer = Buffer.from('')
|
||||
process.stderr.on('data', data => {
|
||||
errBuffer = Buffer.concat([errBuffer, data])
|
||||
|
||||
Reference in New Issue
Block a user