@@ -144,7 +144,7 @@ export abstract class BinaryRunner {
144
144
*/
145
145
private async executeBinaryTask ( args : string [ ] , executionLogDirectory ?: string ) : Promise < any > {
146
146
let command : string = '"' + this . _binary . fullPath + '" ' + args . join ( ' ' ) ;
147
- this . _logManager . debug ( ' Executing ' + command ) ;
147
+ this . _logManager . debug ( " Executing '" + command + "' in directory '" + this . _runDirectory + "'" ) ;
148
148
let std : any = await ScanUtils . executeCmdAsync ( command , this . _runDirectory , this . createEnvForRun ( executionLogDirectory ) ) ;
149
149
if ( std . stdout && std . stdout . length > 0 ) {
150
150
this . logTaskResult ( std . stdout , false ) ;
@@ -256,26 +256,25 @@ export abstract class BinaryRunner {
256
256
*/
257
257
private createRunArguments ( request : AnalyzeScanRequest ) : RunArgs {
258
258
let args : RunArgs = new RunArgs ( ScanUtils . createTmpDir ( ) ) ;
259
- let processedRoots : Set < string > = new Set < string > ( ) ;
260
-
261
- if ( request . roots . length > 0 && request . roots . every ( root => ! processedRoots . has ( root ) ) ) {
262
- // Prepare request information and insert as an actual request
263
- const requestPath : string = path . join ( args . directory , 'request_' + args . requests . length ) ;
264
- const responsePath : string = path . join ( args . directory , 'response_' + args . requests . length ) ;
265
- if ( request . type !== ScanType . Sast ) {
266
- request . output = responsePath ;
267
- }
268
- request . type = this . _type ;
269
- request . roots . forEach ( root => processedRoots . add ( root ) ) ;
270
- // Add request to run
271
- args . requests . push ( {
272
- type : request . type ,
273
- request : this . requestsToYaml ( request ) ,
274
- requestPath : requestPath ,
275
- roots : request . roots ,
276
- responsePath : responsePath
277
- } as RunRequest ) ;
259
+ if ( request . roots . length === 0 ) {
260
+ return args ;
261
+ }
262
+
263
+ // Prepare request information and insert as an actual request
264
+ const requestPath : string = path . join ( args . directory , 'request_' + args . requests . length ) ;
265
+ const responsePath : string = path . join ( args . directory , 'response_' + args . requests . length ) ;
266
+ if ( request . type !== ScanType . Sast ) {
267
+ request . output = responsePath ;
278
268
}
269
+ request . type = this . _type ;
270
+ // Add request to run
271
+ args . requests . push ( {
272
+ type : request . type ,
273
+ request : this . requestsToYaml ( request ) ,
274
+ requestPath : requestPath ,
275
+ roots : request . roots ,
276
+ responsePath : responsePath
277
+ } as RunRequest ) ;
279
278
280
279
return args ;
281
280
}
0 commit comments