Skip to content

Commit

Permalink
feat: hide stderr on git push with auth in URL #87
Browse files Browse the repository at this point in the history
  • Loading branch information
janl committed Mar 7, 2018
1 parent ba610fb commit 770c313
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion upload.js
Expand Up @@ -4,6 +4,7 @@

const exec = require('child_process').execSync
const url = require('url')
const fs = require('fs')

const config = require('./lib/config')
const info = require('./ci-services')()
Expand Down Expand Up @@ -49,8 +50,16 @@ module.exports = function upload () {
remote = url.format(urlParsed)
}

const err = fs.createWriteStream('gk-lockfile-git-push.err')

exec(`git remote add gk-origin ${remote}`)
exec(`git push gk-origin HEAD:${info.branchName}`)
exec(`git push gk-origin HEAD:${info.branchName}`, {
stdio: [
'pipe',
'pipe',
err
]
})
}

if (require.main === module) module.exports()

0 comments on commit 770c313

Please sign in to comment.