From 4a5345dd5d0b4da9dff8addde118916a383c56ba Mon Sep 17 00:00:00 2001 From: advplyr Date: Thu, 1 Aug 2024 14:25:57 -0500 Subject: [PATCH] Update:devcontainer dev.js default to not skip binaries check, fail gracefully if required binary env variables are not set when skipping --- .devcontainer/dev.js | 4 ++-- server/managers/BinaryManager.js | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.devcontainer/dev.js b/.devcontainer/dev.js index 28c0074b..054690d4 100644 --- a/.devcontainer/dev.js +++ b/.devcontainer/dev.js @@ -6,5 +6,5 @@ module.exports.config = { MetadataPath: Path.resolve('metadata'), FFmpegPath: '/usr/bin/ffmpeg', FFProbePath: '/usr/bin/ffprobe', - SkipBinariesCheck: true -} \ No newline at end of file + SkipBinariesCheck: false +} diff --git a/server/managers/BinaryManager.js b/server/managers/BinaryManager.js index 63c87e7b..c7db4204 100644 --- a/server/managers/BinaryManager.js +++ b/server/managers/BinaryManager.js @@ -275,6 +275,12 @@ class BinaryManager { async init() { // Optional skip binaries check if (process.env.SKIP_BINARIES_CHECK === '1') { + for (const binary of this.requiredBinaries) { + if (!process.env[binary.envVariable]) { + await Logger.fatal(`[BinaryManager] Environment variable ${binary.envVariable} must be set`) + process.exit(1) + } + } Logger.info('[BinaryManager] Skipping check for binaries') return }