From 2aa561a0ed0b06689addc5ccfe75ec50ce08b814 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sat, 25 Feb 2023 22:21:35 +0100 Subject: [PATCH] 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. --- test/parallel/test-single-executable-application.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-single-executable-application.js b/test/parallel/test-single-executable-application.js index bc0eb763de748c..f41b9d7778d7d3 100644 --- a/test/parallel/test-single-executable-application.js +++ b/test/parallel/test-single-executable-application.js @@ -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 {