From 822b00820db57454acc15dc8de1a8ea4033a6496 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sun, 26 Feb 2023 15:36:58 +0100 Subject: [PATCH] test: fix os-release check for Ubuntu in SEA test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Tobias Nießen Reviewed-By: Darshan Sen Reviewed-By: Luigi Pinca --- 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 {