@@ -28,7 +28,7 @@ export async function uploadAllAvailableDebugArtifacts(
28
28
config : Config ,
29
29
logger : Logger ,
30
30
) {
31
- let filesToUpload : string [ ] = [ ] ;
31
+ const filesToUpload : string [ ] = [ ] ;
32
32
33
33
const analyzeActionOutputDir = process . env [ EnvVar . SARIF_RESULTS_OUTPUT_DIR ] ;
34
34
for ( const lang of config . languages ) {
@@ -46,15 +46,15 @@ export async function uploadAllAvailableDebugArtifacts(
46
46
`${ lang } .sarif` ,
47
47
) ;
48
48
fs . renameSync ( sarifFile , sarifInDbLocation ) ;
49
- filesToUpload = filesToUpload . concat ( sarifInDbLocation ) ;
49
+ filesToUpload . push ( sarifInDbLocation ) ;
50
50
}
51
51
}
52
52
53
53
// Add any log files
54
54
const databaseDirectory = getCodeQLDatabasePath ( config , lang ) ;
55
55
const logsDirectory = path . resolve ( databaseDirectory , "log" ) ;
56
56
if ( doesDirectoryExist ( logsDirectory ) ) {
57
- filesToUpload = filesToUpload . concat ( listFolder ( logsDirectory ) ) ;
57
+ filesToUpload . push ( ... listFolder ( logsDirectory ) ) ;
58
58
}
59
59
60
60
// Multilanguage tracing: there are additional logs in the root of the cluster
@@ -63,9 +63,7 @@ export async function uploadAllAvailableDebugArtifacts(
63
63
"log" ,
64
64
) ;
65
65
if ( doesDirectoryExist ( multiLanguageTracingLogsDirectory ) ) {
66
- filesToUpload = filesToUpload . concat (
67
- listFolder ( multiLanguageTracingLogsDirectory ) ,
68
- ) ;
66
+ filesToUpload . push ( ...listFolder ( multiLanguageTracingLogsDirectory ) ) ;
69
67
}
70
68
71
69
// Add database bundle
@@ -75,7 +73,7 @@ export async function uploadAllAvailableDebugArtifacts(
75
73
} else {
76
74
databaseBundlePath = await createDatabaseBundleCli ( config , lang ) ;
77
75
}
78
- filesToUpload = filesToUpload . concat ( databaseBundlePath ) ;
76
+ filesToUpload . push ( databaseBundlePath ) ;
79
77
}
80
78
81
79
await uploadDebugArtifacts (
0 commit comments