diff --git a/npm/ng-packs/scripts/push.js b/npm/ng-packs/scripts/push.js index 08162f35ee..6c41b0b697 100644 --- a/npm/ng-packs/scripts/push.js +++ b/npm/ng-packs/scripts/push.js @@ -4,9 +4,13 @@ const execa = require('execa'); (async () => { const answer = await new Confirm('Would you like to push?').run().then(answer => answer); + const remote = execa.sync('git', ['remote']).stdout; + const branch = execa.sync('git', ['rev-parse', '--abbrev-ref', 'HEAD']).stdout; + if (answer) { try { - await execa('git', ['push'], { stdout: 'inherit' }); + await execa('git', ['push', remote, branch], { stdout: 'inherit' }); + await execa('git', ['fetch', remote], { stdout: 'inherit' }); console.log('Successfully!'); } catch (error) { console.log('An error occured.' + error);