2020-02-19 11:14:28 +00:00
|
|
|
// TODO: This file was created by bulk-decaffeinate.
|
|
|
|
// Sanity-check the conversion and remove this comment.
|
2020-02-19 11:14:14 +00:00
|
|
|
/*
|
|
|
|
* decaffeinate suggestions:
|
|
|
|
* DS207: Consider shorter variations of null checks
|
|
|
|
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
|
|
|
*/
|
2020-02-19 11:14:37 +00:00
|
|
|
let commandRunnerPath
|
2021-07-12 16:47:21 +00:00
|
|
|
const Settings = require('@overleaf/settings')
|
2022-03-01 15:09:36 +00:00
|
|
|
const logger = require('@overleaf/logger')
|
2014-02-12 17:27:43 +00:00
|
|
|
|
2020-02-19 11:14:14 +00:00
|
|
|
if ((Settings.clsi != null ? Settings.clsi.dockerRunner : undefined) === true) {
|
2020-02-19 11:14:37 +00:00
|
|
|
commandRunnerPath = './DockerRunner'
|
|
|
|
} else {
|
|
|
|
commandRunnerPath = './LocalCommandRunner'
|
2020-02-19 11:14:14 +00:00
|
|
|
}
|
2022-05-16 12:38:18 +00:00
|
|
|
logger.debug({ commandRunnerPath }, 'selecting command runner for clsi')
|
2020-02-19 11:14:37 +00:00
|
|
|
const CommandRunner = require(commandRunnerPath)
|
2016-05-23 14:45:39 +00:00
|
|
|
|
2020-02-19 11:14:37 +00:00
|
|
|
module.exports = CommandRunner
|