overleaf/services/clsi/app/js/CommandRunner.js
Jakob Ackermann 958216d578 Merge pull request #6926 from overleaf/jpa-clsi-bump-logger-metrics
[clsi] upgrade logger and metrics module

GitOrigin-RevId: 85c346b5eed683672a77d86d6a434dc313b7824b
2022-03-02 09:02:50 +00:00

20 lines
731 B
JavaScript

// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* 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('@overleaf/settings')
const logger = require('@overleaf/logger')
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)
module.exports = CommandRunner