mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Tools - fix toml file read (#9277)
This commit is contained in:
parent
31e1ad0cff
commit
ad1f50304f
@ -1302,10 +1302,11 @@ See the make.cfg file for additional build options.
|
|||||||
addonTomlPath = os.path.join(work_drive, prefix, module, "addon.toml")
|
addonTomlPath = os.path.join(work_drive, prefix, module, "addon.toml")
|
||||||
if os.path.isfile(addonTomlPath):
|
if os.path.isfile(addonTomlPath):
|
||||||
with open(addonTomlPath, "r") as f:
|
with open(addonTomlPath, "r") as f:
|
||||||
if "preprocess = false" in f.read():
|
tomlFile = f.read()
|
||||||
|
if "preprocess = false" in tomlFile:
|
||||||
print_error("'preprocess = false' not supported")
|
print_error("'preprocess = false' not supported")
|
||||||
raise
|
raise
|
||||||
skipPreprocessing = "[preprocess]\nenabled = false" in f.read()
|
skipPreprocessing = "[preprocess]\nenabled = false" in tomlFile
|
||||||
|
|
||||||
if os.path.isfile(os.path.join(work_drive, prefix, module, "$NOBIN$")):
|
if os.path.isfile(os.path.join(work_drive, prefix, module, "$NOBIN$")):
|
||||||
print_green("$NOBIN$ Found. Proceeding with non-binarizing!")
|
print_green("$NOBIN$ Found. Proceeding with non-binarizing!")
|
||||||
|
@ -29,17 +29,19 @@ def get_files_to_process(basePath):
|
|||||||
addonTomlPath = os.path.join(root, "addon.toml")
|
addonTomlPath = os.path.join(root, "addon.toml")
|
||||||
if os.path.isfile(addonTomlPath):
|
if os.path.isfile(addonTomlPath):
|
||||||
with open(addonTomlPath, "r") as f:
|
with open(addonTomlPath, "r") as f:
|
||||||
if "preprocess = false" in f.read():
|
tomlFile = f.read()
|
||||||
|
if "preprocess = false" in tomlFile:
|
||||||
print("'preprocess = false' not supported")
|
print("'preprocess = false' not supported")
|
||||||
raise
|
raise
|
||||||
skipPreprocessing = "[preprocess]\nenabled = false" in f.read()
|
skipPreprocessing = "[preprocess]\nenabled = false" in tomlFile
|
||||||
addonTomlPath = os.path.join(os.path.dirname(root), "addon.toml")
|
addonTomlPath = os.path.join(os.path.dirname(root), "addon.toml")
|
||||||
if os.path.isfile(addonTomlPath):
|
if os.path.isfile(addonTomlPath):
|
||||||
with open(addonTomlPath, "r") as f:
|
with open(addonTomlPath, "r") as f:
|
||||||
if "preprocess = false" in f.read():
|
tomlFile = f.read()
|
||||||
|
if "preprocess = false" in tomlFile:
|
||||||
print("'preprocess = false' not supported")
|
print("'preprocess = false' not supported")
|
||||||
raise
|
raise
|
||||||
skipPreprocessing = "[preprocess]\nenabled = false" in f.read()
|
skipPreprocessing = "[preprocess]\nenabled = false" in tomlFile
|
||||||
if file == "config.cpp" and skipPreprocessing:
|
if file == "config.cpp" and skipPreprocessing:
|
||||||
continue # ignore configs with __has_include
|
continue # ignore configs with __has_include
|
||||||
filePath = os.path.join(root, file)
|
filePath = os.path.join(root, file)
|
||||||
|
Loading…
Reference in New Issue
Block a user