Skip to content

Commit 8ea29cb

Browse files
committed
fix(validate): handle Windows line endings in build script
Update the build script to split 'macro.yml' content by either '\n' or '\r\n'. This fixes a build failure on Windows where carriage returns were causing regex matching to fail when parsing the YAML file.
1 parent d3bfa6f commit 8ea29cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/validate/src/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const FileSystem = require('fs');
22
const Semver = require('semver');
33
const YAML = require('yaml');
44

5-
const lines = FileSystem.readFileSync(`${__dirname}/macro.yml`, 'utf8').split('\n');
5+
const lines = FileSystem.readFileSync(`${__dirname}/macro.yml`, 'utf8').split(/\r?\n/);
66

77
const versions = ['1.13.1', '1.13.0', '1.12.0', '1.11.0', '1.10.0', '1.9.0', '1.8.0', '1.7.0', '1.6.0', '1.5.1', '1.5.0', '1.4.1', '1.4.0', '1.3.0', '1.2.0'];
88

0 commit comments

Comments
 (0)