]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: use printf instead of echo
authorMike Gilbert <floppym@gentoo.org>
Mon, 9 Feb 2026 00:12:30 +0000 (19:12 -0500)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 9 Feb 2026 08:36:26 +0000 (09:36 +0100)
The echo builtin provided by some shells (mksh) will interpret \x2d as
an escape sequence. This causes meson to fail:

```
test/fuzz/meson.build:93:52: ERROR: File fuzz-unit-file/dm-back-slash.swap does not exist.
```

Bug: https://bugs.gentoo.org/969789

test/fuzz/meson.build

index d4cfc0a5b4816d81ba3e53a8d6114bfdba4c8b58..6f9f43a4105f9d97edca85b555306d9f060177ed 100644 (file)
@@ -42,7 +42,7 @@ if git.found() and fs.is_dir(meson.project_source_root() / '.git')
                           'ls-files', ':/@0@/*/*'.format(fuzz_testsdir),
                           check: true)
 else
-        out = run_command(sh, '-c', 'cd "@0@"; echo @1@/*/*'.format(meson.project_source_root(), fuzz_testsdir), check: true)
+        out = run_command(sh, '-c', 'cd "@0@"; printf "%s " @1@/*/*'.format(meson.project_source_root(), fuzz_testsdir), check: true)
 endif
 
 # Add crafted fuzz inputs we have in the repo