CommandRunner.js 733 B

1234567891011121314151617181920
  1. // TODO: This file was created by bulk-decaffeinate.
  2. // Sanity-check the conversion and remove this comment.
  3. /*
  4. * decaffeinate suggestions:
  5. * DS207: Consider shorter variations of null checks
  6. * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
  7. */
  8. let commandRunnerPath
  9. const Settings = require('settings-sharelatex')
  10. const logger = require('logger-sharelatex')
  11. if ((Settings.clsi != null ? Settings.clsi.dockerRunner : undefined) === true) {
  12. commandRunnerPath = './DockerRunner'
  13. } else {
  14. commandRunnerPath = './LocalCommandRunner'
  15. }
  16. logger.info({ commandRunnerPath }, 'selecting command runner for clsi')
  17. const CommandRunner = require(commandRunnerPath)
  18. module.exports = CommandRunner