Skip to content

Commit 550e91d

Browse files
committed
meson.build: Simplify if-file-exists test
1 parent 9fc3416 commit 550e91d

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

meson.build

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -137,17 +137,9 @@ if maintainer_mode
137137
project_source_root / 'untracked' / 'docs' / 'docs',
138138
check: true,
139139
)
140-
else
141-
cmd_py = '''
142-
import os
143-
import sys
144-
sys.exit(os.path.isfile("@0@"))
145-
'''.format(doc_reference)
146-
file_exists = run_command(python3, '-c', cmd_py, check: false).returncode() != 0
147-
if not file_exists
148-
warning('Missing files in untracked/. ' + \
149-
'Enable maintainer-mode if you want to build documentation or create a dist tarball.')
150-
endif
140+
elif not import('fs').is_file(doc_reference)
141+
warning('Missing files in untracked/.\n ' + \
142+
'Enable maintainer-mode if you want to build documentation or create a dist tarball.')
151143
endif
152144

153145
# Check if perl is required and available.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy