Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix os-release check for Ubuntu in SEA test #46838

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
addaleax committed Feb 25, 2023
commit 2aa561a0ed0b06689addc5ccfe75ec50ce08b814
2 changes: 1 addition & 1 deletion test/parallel/test-single-executable-application.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down