]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tools/peertube-repl.ts
Update E2E tests
[github/Chocobozzz/PeerTube.git] / server / tools / peertube-repl.ts
index 6800ff8ab99b10259ee69ad425cbdfd720c3e644..04d8b95a3076b4736bb1b76a23727f650ecc4561 100644 (file)
@@ -20,14 +20,10 @@ import * as signupUtils from '../helpers/signup'
 import * as utils from '../helpers/utils'
 import * as YoutubeDLUtils from '../helpers/youtube-dl'
 
-let versionCommitHash
-
 const start = async () => {
   await initDatabaseModels(true)
 
-  await utils.getVersion().then((data) => {
-    versionCommitHash = data
-  })
+  const versionCommitHash = await utils.getServerCommit()
 
   const initContext = (replServer) => {
     return (context) => {
@@ -59,6 +55,7 @@ const start = async () => {
 
   initContext(replServer)(replServer.context)
   replServer.on('reset', initContext(replServer))
+  replServer.on('exit', () => process.exit())
 
   const resetCommand = {
     help: 'Reset REPL',