diff options
author | Chocobozzz <me@florianbigard.com> | 2021-03-11 09:51:08 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-03-24 18:18:40 +0100 |
commit | ae71acca14e9420646ca7655e64eb9adc13e3006 (patch) | |
tree | 97e1e4bd94ecfbabc9b99fa5670b72440db82890 /server/initializers/checker-before-init.ts | |
parent | db8b2f56c014a3fa207501f74e0bb5088ea41719 (diff) | |
download | PeerTube-ae71acca14e9420646ca7655e64eb9adc13e3006.tar.gz PeerTube-ae71acca14e9420646ca7655e64eb9adc13e3006.tar.zst PeerTube-ae71acca14e9420646ca7655e64eb9adc13e3006.zip |
Check ffmepg version on startup
Diffstat (limited to 'server/initializers/checker-before-init.ts')
-rw-r--r-- | server/initializers/checker-before-init.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts index 565e0d1fa..65a019ca6 100644 --- a/server/initializers/checker-before-init.ts +++ b/server/initializers/checker-before-init.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import * as config from 'config' | 1 | import * as config from 'config' |
2 | import { promisify0 } from '../helpers/core-utils' | 2 | import { parseSemVersion, promisify0 } from '../helpers/core-utils' |
3 | import { logger } from '../helpers/logger' | 3 | import { logger } from '../helpers/logger' |
4 | 4 | ||
5 | // ONLY USE CORE MODULES IN THIS FILE! | 5 | // ONLY USE CORE MODULES IN THIS FILE! |
@@ -102,8 +102,7 @@ async function checkFFmpeg (CONFIG: { TRANSCODING: { ENABLED: boolean } }) { | |||
102 | 102 | ||
103 | function checkNodeVersion () { | 103 | function checkNodeVersion () { |
104 | const v = process.version | 104 | const v = process.version |
105 | const majorString = v.split('.')[0].replace('v', '') | 105 | const { major } = parseSemVersion(v) |
106 | const major = parseInt(majorString, 10) | ||
107 | 106 | ||
108 | logger.debug('Checking NodeJS version %s.', v) | 107 | logger.debug('Checking NodeJS version %s.', v) |
109 | 108 | ||