2020-02-19 06:14:28 -05:00
|
|
|
// TODO: This file was created by bulk-decaffeinate.
|
|
|
|
// Sanity-check the conversion and remove this comment.
|
2020-02-19 06:14:14 -05: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 06:14:37 -05:00
|
|
|
let commandRunnerPath
|
2021-07-12 12:47:21 -04:00
|
|
|
const Settings = require('@overleaf/settings')
|
2022-03-01 10:09:36 -05:00
|
|
|
const logger = require('@overleaf/logger')
|
2014-02-12 12:27:43 -05:00
|
|
|
|
2020-02-19 06:14:14 -05:00
|
|
|
if ((Settings.clsi != null ? Settings.clsi.dockerRunner : undefined) === true) {
|
2020-02-19 06:14:37 -05:00
|
|
|
commandRunnerPath = './DockerRunner'
|
|
|
|
} else {
|
|
|
|
commandRunnerPath = './LocalCommandRunner'
|
2020-02-19 06:14:14 -05:00
|
|
|
}
|
2020-02-19 06:14:37 -05:00
|
|
|
logger.info({ commandRunnerPath }, 'selecting command runner for clsi')
|
|
|
|
const CommandRunner = require(commandRunnerPath)
|
2016-05-23 10:45:39 -04:00
|
|
|
|
2020-02-19 06:14:37 -05:00
|
|
|
module.exports = CommandRunner
|