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
|
|
|
|
*/
|
|
|
|
let commandRunnerPath;
|
|
|
|
const Settings = require("settings-sharelatex");
|
|
|
|
const logger = require("logger-sharelatex");
|
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) {
|
|
|
|
commandRunnerPath = "./DockerRunner";
|
|
|
|
} else {
|
|
|
|
commandRunnerPath = "./LocalCommandRunner";
|
|
|
|
}
|
|
|
|
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:14 -05:00
|
|
|
module.exports = CommandRunner;
|