Skip to content

Commit

Permalink
Update:devcontainer dev.js default to not skip binaries check, fail g…
Browse files Browse the repository at this point in the history
…racefully if required binary env variables are not set when skipping
  • Loading branch information
advplyr committed Aug 1, 2024
1 parent 1e6dd0e commit 4a5345d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ module.exports.config = {
MetadataPath: Path.resolve('metadata'),
FFmpegPath: '/usr/bin/ffmpeg',
FFProbePath: '/usr/bin/ffprobe',
SkipBinariesCheck: true
}
SkipBinariesCheck: false
}
6 changes: 6 additions & 0 deletions server/managers/BinaryManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 4a5345d

Please sign in to comment.