@@ -37,24 +37,29 @@ export async function run(): Promise<void> {
37
37
}
38
38
39
39
// download pack
40
- core . info ( `Downloading CodeQL Actions pack '${ codeql . pack } '` ) ;
41
- //var pack_downloaded = await cql.downloadPack(codeql);
40
+ // core.info(`Downloading CodeQL Actions pack '${codeql.pack}'`);
41
+ // var pack_downloaded = await cql.downloadPack(codeql);
42
42
43
+ core . info ( `Cloning CodeQL Actions pack into '${ codeql . pack } '` ) ;
43
44
let pack_path = "/tmp/codeql-actions" ;
44
- var pack_downloaded = await gh . clonePackRepo ( ghc , pack_path ) ;
45
- await cql . installPack ( codeql , pack_path ) ;
46
-
47
- if ( pack_downloaded === false ) {
48
- var action_path = path . resolve ( path . join ( __dirname , ".." , ".." , ".." ) ) ;
49
- core . info ( `Pack path: '${ action_path } '` ) ;
50
- codeql . pack = path . join ( action_path , "ql" , "src" ) ;
51
- core . info ( `Codeql pack path: '${ codeql . path } '` ) ;
52
-
53
- core . info ( `Pack defaulting back to local pack: '${ codeql . pack } '` ) ;
54
- } else {
55
- core . info ( `Pack downloaded '${ codeql . pack } '` ) ;
45
+ var pack_cloned = await gh . clonePackRepo ( ghc , pack_path ) ;
46
+ core . info ( `Cloned CodeQL Actions pack into '${ pack_path } '` ) ;
47
+
48
+ if ( pack_cloned === false ) {
49
+ throw new Error ( "Could not clone the actions ql pack" ) ;
56
50
}
57
51
52
+ core . info ( `Installing CodeQL Actions packs from '${ pack_path } '` ) ;
53
+ var pack_installed = await cql . installPack ( codeql , pack_path ) ;
54
+
55
+ if ( pack_installed === false ) {
56
+ throw new Error ( "Could not install the actions ql packs" ) ;
57
+ }
58
+
59
+ core . info ( `Pack path: '${ pack_path } '` ) ;
60
+ codeql . pack = path . join ( pack_path , "ql" , "src" ) ;
61
+ core . info ( `Codeql Queries pack path: '${ codeql . pack } '` ) ;
62
+
58
63
core . info ( "Creating CodeQL database..." ) ;
59
64
var database_path = await cql . codeqlDatabaseCreate ( codeql ) ;
60
65
0 commit comments