From e8c7cbe56a72b32537b5251314a028d596940b27 Mon Sep 17 00:00:00 2001
From: ali asaria <aliasaria@users.noreply.github.com>
Date: Fri, 16 Aug 2024 11:25:29 -0400
Subject: [PATCH] don't display installed packages to the log

---
 src/main/util.ts | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/main/util.ts b/src/main/util.ts
index 5bee95b7..49f5ccf7 100644
--- a/src/main/util.ts
+++ b/src/main/util.ts
@@ -256,7 +256,8 @@ export async function checkDependencies() {
   }
 
   const { error, stdout, stderr } = await executeInstallStep(
-    'list_installed_packages'
+    'list_installed_packages',
+    false
   );
 
   // if there was an error abort processing
@@ -366,7 +367,7 @@ function truncate(str: string, max: number) {
  * @param argument parameter to pass to install.sh
  * @returns the stdout of the process or false on failure.
  */
-export async function executeInstallStep(argument: string) {
+export async function executeInstallStep(argument: string, logToFile = true) {
   const server_dir = await getTransformerLabCodeDir();
   const logFilePath = await getLogFilePath();
   const out = fs.openSync(logFilePath, 'a');
@@ -407,11 +408,11 @@ export async function executeInstallStep(argument: string) {
   }
   if (stdout) {
     console.log(`${installScriptFilename} stdout:`, truncate(stdout, 150));
-    fs.writeSync(out, stdout);
+    if (logToFile) fs.writeSync(out, stdout);
   }
   if (stderr) {
     console.error(`${installScriptFilename} stderr:`, stderr);
-    fs.writeSync(err, stderr);
+    if (logToFile) fs.writeSync(err, stderr);
   }
   return { error, stdout, stderr };
 }
-- 
GitLab