Update:devcontainer dev.js default to not skip binaries check, fail gracefully if required binary env variables are not set when skipping

This commit is contained in:
advplyr 2024-08-01 14:25:57 -05:00
parent 1e6dd0e3e0
commit 4a5345dd5d
2 changed files with 8 additions and 2 deletions

View File

@ -6,5 +6,5 @@ module.exports.config = {
MetadataPath: Path.resolve('metadata'),
FFmpegPath: '/usr/bin/ffmpeg',
FFProbePath: '/usr/bin/ffprobe',
SkipBinariesCheck: true
}
SkipBinariesCheck: false
}

View File

@ -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
}