From 7d1648103cb0bebcfe705ed25b2794871098d9b6 Mon Sep 17 00:00:00 2001 From: "John L. Singleton" Date: Tue, 5 Mar 2024 11:54:52 -0500 Subject: [PATCH] enable debugging --- .../CodeQL/CodeQLInstallation.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/CodeQLToolkit.Shared/CodeQL/CodeQLInstallation.cs b/src/CodeQLToolkit.Shared/CodeQL/CodeQLInstallation.cs index f9cf8d1..efaa90e 100644 --- a/src/CodeQLToolkit.Shared/CodeQL/CodeQLInstallation.cs +++ b/src/CodeQLToolkit.Shared/CodeQL/CodeQLInstallation.cs @@ -6,6 +6,7 @@ using LibGit2Sharp; using System.IO.Compression; using System.Diagnostics; +using System; @@ -284,6 +285,17 @@ private void CustomBundleInstall() // next, we run the bundling tool. // typical command line: // codeql_bundle -b .\scratch\codeql-bundle-win64.tar.gz -o scratch\out -w .\tests\workspace\ --help + var bundleArgs = $"--log DEBUG -b {customBundleSource} -o {CustomBundleOutputDirectory} -w {workingDirectory} {packs}"; + + if (QuickBundle) + { + Log.G().LogInformation($"Note: Quick Bundles enabled and pre-compilation will be disabled..."); + bundleArgs = $"--log DEBUG -nc -b {customBundleSource} -o {CustomBundleOutputDirectory} -w {workingDirectory} {packs}"; + } + + Log.G().LogInformation($"Executing Bundle Tool with Working Directory: `{workingDirectory}`"); + Log.G().LogInformation($"Executing Bundle Tool with Arguments: `{bundleArgs}`"); + using (Process process = new Process()) { process.StartInfo.FileName = ToolUtil.GetTool("codeql_bundle"); @@ -294,11 +306,11 @@ private void CustomBundleInstall() if (QuickBundle) { Log.G().LogInformation($"Note: Quick Bundles enabled and pre-compilation will be disabled..."); - process.StartInfo.Arguments = $"-nc -b {customBundleSource} -o {CustomBundleOutputDirectory} -w {workingDirectory} {packs}"; + process.StartInfo.Arguments = bundleArgs; } else { - process.StartInfo.Arguments = $"-b {customBundleSource} -o {CustomBundleOutputDirectory} -w {workingDirectory} {packs}"; + process.StartInfo.Arguments = bundleArgs; } process.Start();