Skip to content

Commit f2b8c80

Browse files
committed
Merge branch 'ms/meson-with-ancient-git-wo-ls-files-dedup' into next
Build fix. * ms/meson-with-ancient-git-wo-ls-files-dedup: meson: tolerate errors from git ls-files --deduplicate
2 parents dd9490d + 3bdd897 commit f2b8c80

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

meson.build

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -694,9 +694,14 @@ third_party_excludes = [
694694

695695
headers_to_check = []
696696
if git.found() and fs.exists(meson.project_source_root() / '.git')
697-
foreach header : run_command(git, '-C', meson.project_source_root(), 'ls-files', '--deduplicate', '*.h', third_party_excludes, check: true).stdout().split()
698-
headers_to_check += header
699-
endforeach
697+
ls_headers = run_command(git, '-C', meson.project_source_root(), 'ls-files', '--deduplicate', '*.h', third_party_excludes, check: false)
698+
if ls_headers.returncode() == 0
699+
foreach header : ls_headers.stdout().split()
700+
headers_to_check += header
701+
endforeach
702+
else
703+
warning('could not list headers, disabling static analysis targets')
704+
endif
700705
endif
701706

702707
if not get_option('breaking_changes')

0 commit comments

Comments
 (0)