@@ -56,7 +56,7 @@ const commit = (pushDir) => __awaiter(this, void 0, void 0, function* () {
5656const push = ( pushDir , branch , context ) => __awaiter ( this , void 0 , void 0 , function * ( ) {
5757 signale_1 . default . info ( 'Pushing to %s@%s' , misc_1 . getRepository ( context ) , branch ) ;
5858 const url = misc_1 . getGitUrl ( context ) ;
59- yield execAsync ( `git -C ${ pushDir } push --quiet "${ url } " "${ branch } ":"${ branch } "` , true , 'git push' ) ;
59+ yield execAsync ( `git -C ${ pushDir } push --quiet "${ url } " "${ branch } ":"${ branch } "` , false , 'git push' ) ;
6060} ) ;
6161const cloneForBuild = ( buildDir , context ) => __awaiter ( this , void 0 , void 0 , function * ( ) {
6262 signale_1 . default . info ( 'Cloning the working commit from the remote repo for build' ) ;
@@ -91,22 +91,18 @@ const copyFiles = (buildDir, pushDir) => __awaiter(this, void 0, void 0, functio
9191 yield execAsync ( `rsync -rl --exclude .git --delete "${ buildDir } /" ${ pushDir } ` ) ;
9292} ) ;
9393const execAsync = ( command , quiet = false , altCommand = null , suppressError = false ) => new Promise ( ( resolve , reject ) => {
94- if ( quiet && 'string' === typeof altCommand )
94+ if ( 'string' === typeof altCommand )
9595 signale_1 . default . info ( `Run command: ${ altCommand } ` ) ;
9696 if ( ! quiet )
9797 signale_1 . default . info ( `Run command: ${ command } ` ) ;
9898 child_process_1 . exec ( command + ( quiet ? ' > /dev/null 2>&1' : '' ) + ( suppressError ? ' || :' : '' ) , ( error , stdout ) => {
9999 if ( error ) {
100- if ( quiet ) {
101- console . log ( stdout ) ;
102- console . log ( error . message ) ;
103- if ( 'string' === typeof altCommand )
104- reject ( new Error ( `command [${ altCommand } ] exited with code ${ error . code } .` ) ) ;
105- else
106- reject ( new Error ( `command exited with code ${ error . code } .` ) ) ;
107- }
108- else
100+ if ( 'string' === typeof altCommand )
101+ reject ( new Error ( `command [${ altCommand } ] exited with code ${ error . code } .` ) ) ;
102+ else if ( ! quiet )
109103 reject ( new Error ( `command [${ command } ] exited with code ${ error . code } .` ) ) ;
104+ else
105+ reject ( new Error ( `command exited with code ${ error . code } .` ) ) ;
110106 }
111107 else {
112108 if ( ! quiet )
0 commit comments