|
|
@ -261,8 +261,10 @@ class FSModule(ExtensionModule): |
|
|
|
try: |
|
|
|
try: |
|
|
|
with open(path, encoding=encoding) as f: |
|
|
|
with open(path, encoding=encoding) as f: |
|
|
|
data = f.read() |
|
|
|
data = f.read() |
|
|
|
|
|
|
|
except FileNotFoundError: |
|
|
|
|
|
|
|
raise MesonException(f'File {args[0]} does not exist.') |
|
|
|
except UnicodeDecodeError: |
|
|
|
except UnicodeDecodeError: |
|
|
|
raise MesonException(f'decoding failed for {path}') |
|
|
|
raise MesonException(f'decoding failed for {args[0]}') |
|
|
|
# Reconfigure when this file changes as it can contain data used by any |
|
|
|
# Reconfigure when this file changes as it can contain data used by any |
|
|
|
# part of the build configuration (e.g. `project(..., version: |
|
|
|
# part of the build configuration (e.g. `project(..., version: |
|
|
|
# fs.read_file('VERSION')` or `configure_file(...)` |
|
|
|
# fs.read_file('VERSION')` or `configure_file(...)` |
|
|
|