@@ -99,13 +99,10 @@ const downloadAndUnzip = async (filePath, fileName, url) => {
99
99
let tmpFilePath = path . join ( filePath , fileName ) ;
100
100
const writer = fs . createWriteStream ( tmpFilePath ) ;
101
101
102
- console . log ( `roshan1: url ${ url } ` )
103
- console . log ( `roshan inside downloadAndUnzip` )
104
- return request . get ( url ) . on ( 'response' , function ( response ) {
105
- //ensure that the user can call `then()` only when the file has
106
- //been downloaded entirely.
107
- console . log ( `roshan1: response ${ inspect ( response ) } ` )
108
- return new Promise ( async ( resolve , reject ) => {
102
+ return new Promise ( async ( resolve , reject ) => {
103
+ request . get ( url ) . on ( 'response' , function ( response ) {
104
+ //ensure that the user can call `then()` only when the file has
105
+ //been downloaded entirely.
109
106
response . pipe ( writer ) ;
110
107
let error = null ;
111
108
writer . on ( 'error' , err => {
@@ -183,7 +180,6 @@ const sendUpdatesToBstack = async (bsConfig, buildId, args, options, rawArgs) =>
183
180
}
184
181
185
182
exports . downloadBuildArtifacts = async ( bsConfig , buildId , args , rawArgs ) => {
186
- console . log ( 'hello brother' )
187
183
BUILD_ARTIFACTS_FAIL_COUNT = 0 ;
188
184
BUILD_ARTIFACTS_TOTAL_COUNT = 0 ;
189
185
@@ -219,7 +215,6 @@ exports.downloadBuildArtifacts = async (bsConfig, buildId, args, rawArgs) => {
219
215
} else {
220
216
await createDirectories ( buildId , buildDetails ) ;
221
217
await parseAndDownloadArtifacts ( buildId , buildDetails ) ;
222
- console . log ( `roshan1 making request passed1 ${ inspect ( buildDetails ) } ` ) ;
223
218
if ( BUILD_ARTIFACTS_FAIL_COUNT > 0 ) {
224
219
messageType = Constants . messageTypes . ERROR ;
225
220
message = Constants . userMessages . DOWNLOAD_BUILD_ARTIFACTS_FAILED . replace ( '<build-id>' , buildId ) . replace ( '<machine-count>' , BUILD_ARTIFACTS_FAIL_COUNT ) ;
@@ -251,7 +246,6 @@ exports.downloadBuildArtifacts = async (bsConfig, buildId, args, rawArgs) => {
251
246
}
252
247
} ) ;
253
248
} catch ( err ) {
254
- console . log ( `roshan1: error here ${ err } ` )
255
249
utils . sendUsageReport ( bsConfig , args , err , Constants . messageTypes . ERROR , 'api_failed_build_artifacts' , null , rawArgs ) ;
256
250
process . exitCode = Constants . ERROR_EXIT_CODE ;
257
251
}
0 commit comments