debug inside bare

Signed-off-by: dzdidi <deniszalessky@gmail.com>
This commit is contained in:
dzdidi
2024-01-24 11:54:03 +00:00
parent b838205f71
commit f3d7adadd8

View File

@@ -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])