From 5f7d1f589a56b3d3ea2026dcbd5f9c48b8dc9e6d Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Wed, 28 Aug 2024 21:42:41 -0400 Subject: [PATCH] fix: don't var when no var --- src/backend/src/services/runtime-analysis/LogService.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/backend/src/services/runtime-analysis/LogService.js b/src/backend/src/services/runtime-analysis/LogService.js index 860b29a1..5daec8a9 100644 --- a/src/backend/src/services/runtime-analysis/LogService.js +++ b/src/backend/src/services/runtime-analysis/LogService.js @@ -462,6 +462,11 @@ class LogService extends BaseService { { const fs = require('fs'); const path = '/var/puter/logs/heyputer'; + // Making this directory if it doesn't exist causes issues + // for users running with development instructions + if ( ! fs.existsSync('/var/puter') ) { + return; + } try { fs.mkdirSync(path, { recursive: true }); this.log_directory = path;