This repository was archived by the owner on Jan 31, 2025. It is now read-only.
Commit dad1f2f
committed
meson: fix warning about unexpected return code checking for run_command
Recent versions of Meson warn you that the default is to not check the
return code, which is a bad default and may eventually change. To
suppress this warning, an explicit `check: ` value must be set.
Considering the code in play here:
- check if git exists
- if so, always assume this is running from a git checkout
- embed either '()' or '(git describe version)'
it seems likely the intention is indeed to have it be `check: false`,
but there's some missing error checking here to ensure it.
Check the returncode. If git fails, it is surely because there is no git
repository and the build is being run from a tarball. In that case,
behave as though git wasn't found in the first place, and use the
fallback value.
Suppressing the warning can be done without bumping the minimum version
of meson by only passing it on sufficiently new versions of Meson. This
can be simplified by bumping the minimum version of Meson, which may or
may not be desirable.
Signed-off-by: Eli Schwartz <[email protected]>1 parent 67f619a commit dad1f2f
1 file changed
+13
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
30 | 37 | | |
31 | 38 | | |
32 | 39 | | |
| |||
0 commit comments