Skip to content

Commit df155b8

Browse files
addaleaxtargos
authored andcommitted
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: #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>
1 parent f914bff commit df155b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-single-executable-application.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ if (process.config.variables.want_separate_host_toolset !== 0)
4141
if (process.platform === 'linux') {
4242
try {
4343
const osReleaseText = readFileSync('/etc/os-release', { encoding: 'utf-8' });
44-
if (!/^NAME="Ubuntu"/.test(osReleaseText)) {
44+
if (!/^NAME="Ubuntu"/m.test(osReleaseText)) {
4545
throw new Error('Not Ubuntu.');
4646
}
4747
} catch {

0 commit comments

Comments
 (0)