Skip to content

Commit

Permalink
Analyze LUA file lines with \n not EOL (#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
evantahler authored Oct 31, 2020
1 parent 8489685 commit 431f8c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 431f8c0

Please sign in to comment.