CommandRunner.js 741 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. import Settings from '@overleaf/settings'
  9. import logger from '@overleaf/logger'
  10. let commandRunnerPath
  11. if ((Settings.clsi != null ? Settings.clsi.dockerRunner : undefined) === true) {
  12. commandRunnerPath = './DockerRunner.js'
  13. } else {
  14. commandRunnerPath = './LocalCommandRunner.js'
  15. }
  16. logger.debug({ commandRunnerPath }, 'selecting command runner for clsi')
  17. const CommandRunner = (await import(commandRunnerPath)).default
  18. export default CommandRunner