decaffeinate: Run post-processing cleanups on CommandRunner.coffee and 25 other files

This commit is contained in:
decaffeinate
2020-02-19 12:14:28 +01:00
committed by mserranom
parent 4655768fd2
commit c056ca6968
26 changed files with 206 additions and 36 deletions

View File

@@ -1,3 +1,11 @@
/* eslint-disable
camelcase,
no-cond-assign,
no-unused-vars,
node/no-deprecated-api,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS101: Remove unnecessary use of Array.from
@@ -28,7 +36,7 @@ module.exports = (ForbidSymlinks = function(staticFn, root, options) {
return res.sendStatus(404);
}
// check that the file does not use a relative path
for (let dir of Array.from(file.split('/'))) {
for (const dir of Array.from(file.split('/'))) {
if (dir === '..') {
logger.warn({path}, "attempt to use a relative path");
return res.sendStatus(404);