Feature/106 customer first last name #109
@@ -28,7 +28,13 @@ const compose = readFileSync(COMPOSE_PATH, 'utf8');
|
||||
// A mention inside a comment cannot match, because a comment line starts with #.
|
||||
function environmentEntries(source: string): Map<string, string> {
|
||||
const entries = new Map<string, string>();
|
||||
for (const line of source.split('\n')) {
|
||||
// The split pattern tolerates carriage returns. A checkout with CRLF line
|
||||
// endings, which is every fresh clone on Windows, otherwise leaves a stray
|
||||
// carriage return that the end-of-line anchor below cannot match, and every
|
||||
// assertion in this file then silently finds nothing at all. That is exactly
|
||||
// the failure the "parsed some entries" case exists to catch, and it is how
|
||||
// this guard was found to be broken.
|
||||
for (const line of source.split(/\r?\n/)) {
|
||||
const match = /^\s+- ([A-Z_0-9]+)=(.*)$/.exec(line);
|
||||
if (match) {
|
||||
entries.set(match[1], match[2].trim());
|
||||
|
||||
Reference in New Issue
Block a user