1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Rename command files

This commit is contained in:
Chocobozzz 2021-07-06 10:22:37 +02:00
parent c1bc8ee478
commit f59545d97a
No known key found for this signature in database
GPG key ID: 583A612D890159BE
10 changed files with 9 additions and 9 deletions

View file

@ -1,23 +0,0 @@
import { exec } from 'child_process'
import { AbstractCommand } from '../shared'
export class CLICommand extends AbstractCommand {
static exec (command: string) {
return new Promise<string>((res, rej) => {
exec(command, (err, stdout, _stderr) => {
if (err) return rej(err)
return res(stdout)
})
})
}
getEnv () {
return `NODE_ENV=test NODE_APP_INSTANCE=${this.server.internalServerNumber}`
}
async execWithEnv (command: string) {
return CLICommand.exec(`${this.getEnv()} ${command}`)
}
}