File tree Expand file tree Collapse file tree 4 files changed +17
-16
lines changed
tasks/synopsys-detect-task Expand file tree Collapse file tree 4 files changed +17
-16
lines changed Original file line number Diff line number Diff line change 11{
22 "id" : " 5e9b6b5e-3130-47dc-89c5-77a58949f2cf" ,
33 "name" : " SynopsysDetectTask" ,
4- "friendlyName" : " Synopsys Detect QA " ,
4+ "friendlyName" : " Synopsys Detect Dev " ,
55 "description" : " Execute Synopsys Detect against your build" ,
66 "author" : " Synopsys" ,
77 "category" : " Utility" ,
1313 "version" : {
1414 "Major" : 7 ,
1515 "Minor" : 0 ,
16- "Patch" : 3
16+ "Patch" : 24
1717 },
1818 "minimumAgentVersion" : " 1.95.0" ,
1919 "instanceNameFormat" : " Run Synopsys Detect for your build $(message)" ,
8181 {
8282 "name" : " DetectAirGapJarDirectoryPath" ,
8383 "type" : " string" ,
84- "defaultValue" : " Agent.ToolsDirectory " ,
84+ "defaultValue" : " " ,
8585 "label" : " Detect Air Gap Jar Directory Path" ,
8686 "required" : true ,
8787 "helpMarkDown" : " The extracted Detect jar directory path that will be used for Air Gap mode." ,
9393 "target" : " detect-task.js"
9494 }
9595 }
96- }
96+ }
Original file line number Diff line number Diff line change @@ -19,18 +19,17 @@ export class DetectJarConfigurationRunner extends DetectRunner {
1919 }
2020
2121 createRunnerConfiguration ( ) : IDetectRunnerConfiguration {
22+ logger . info ( 'Checking jar directory.' )
23+ if ( ! fileSystem . existsSync ( this . jarDirectoryPath ) ) {
24+ throw new Error ( `Directory did not exist '${ this . jarDirectoryPath } '` ) ;
25+ }
26+
2227 const firstJarFile : string = fileSystem . readdirSync ( this . jarDirectoryPath )
2328 . find ( file => DetectJarConfigurationRunner . JAR_EXTENSION === path . parse ( file ) . ext ) || ''
2429
2530 if ( ! firstJarFile || ! firstJarFile . startsWith ( DetectJarConfigurationRunner . JAR_PREFIX ) ) {
2631 logger . warn ( 'Should have only the detect jar in this directory.' )
27- logger . error ( `Was unable to find valid jar in ${ this . jarDirectoryPath } .` )
28-
29- return {
30- fileName : '' ,
31- runCommands : [ ] ,
32- runnerTool : ''
33- }
32+ throw new Error ( `Was unable to find valid jar in ${ this . jarDirectoryPath } .` )
3433 } else {
3534 logger . info ( `Found jar file '${ firstJarFile } '` )
3635 }
Original file line number Diff line number Diff line change @@ -26,13 +26,15 @@ export abstract class DetectRunner {
2626 logger . info ( 'Setting up the env to run Detect...' )
2727 const detectSetup = this . setupDetect ( )
2828 const env = detectSetup . getEnv ( )
29+
2930 logger . info ( 'Parsing detect arguments...' )
3031 const cleanedArguments : string [ ] = detectSetup . convertArgumentsToPassableValues ( )
3132 const config : IDetectRunnerConfiguration = this . createRunnerConfiguration ( )
33+
3234 logger . info ( 'Determining folder where Detect is located...' )
3335 const artifactFolder : string = await this . retrieveOrCreateArtifactFolder ( config . fileName )
34- const toolRunner = new ADOToolRunner ( config )
3536
37+ const toolRunner = new ADOToolRunner ( config )
3638 return await toolRunner . invoke ( cleanedArguments , artifactFolder , env )
3739 }
3840}
Original file line number Diff line number Diff line change 11{
22 "manifestVersion" : 1 ,
3- "id" : " synopsys-detect-qa " ,
4- "version" : " 7.0.3 " ,
5- "name" : " Synopsys Detect QA " ,
3+ "id" : " synopsys-detect-dev " ,
4+ "version" : " 7.0.24 " ,
5+ "name" : " Synopsys Detect Dev " ,
66 "publisher" : " synopsys-detect" ,
77 "public" : false ,
88 "targets" : [
146146 }
147147 }
148148 ]
149- }
149+ }
You can’t perform that action at this time.
0 commit comments