mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
test: fix os-release check for Ubuntu in SEA test
For example, my `/etc/os-release` file begins with ``` PRETTY_NAME="Ubuntu 22.04.2 LTS" NAME="Ubuntu" VERSION_ID="22.04" ``` so in order to match the regexp here, the `/m` flag is necessary. PR-URL: https://github.com/nodejs/node/pull/46838 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
@@ -41,7 +41,7 @@ if (process.config.variables.want_separate_host_toolset !== 0)
|
||||
if (process.platform === 'linux') {
|
||||
try {
|
||||
const osReleaseText = readFileSync('/etc/os-release', { encoding: 'utf-8' });
|
||||
if (!/^NAME="Ubuntu"/.test(osReleaseText)) {
|
||||
if (!/^NAME="Ubuntu"/m.test(osReleaseText)) {
|
||||
throw new Error('Not Ubuntu.');
|
||||
}
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user