From 431f8c0a42b52dcf8fb4b9d54fbb5cca406caba0 Mon Sep 17 00:00:00 2001 From: Evan Tahler Date: Sat, 31 Oct 2020 13:49:57 -0700 Subject: [PATCH] Analyze LUA file lines with \n not EOL (#467) --- src/core/connection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/connection.ts b/src/core/connection.ts index 3bf0cbe4..99cd6818 100644 --- a/src/core/connection.ts +++ b/src/core/connection.ts @@ -102,7 +102,7 @@ export class Connection extends EventEmitter { const file = files[i]; const { name } = path.parse(file); const contents = fs.readFileSync(path.join(luaDir, file)).toString(); - const lines = contents.split(os.EOL); + const lines = contents.split("\n"); // see https://github.com/actionhero/node-resque/issues/465 for why we split only on *nix line breaks const encodedMetadata = lines[0].replace(/^-- /, ""); const metadata = JSON.parse(encodedMetadata);