fix logic typo in before_text
This commit is contained in:
@ -38,7 +38,7 @@ def loadConfig(configPath):
|
||||
|
||||
def ensureDirectory(path):
|
||||
"""Ensure that a directory exists."""
|
||||
print(f"\nChecking or creating directory: {path}")
|
||||
print(f"\nChecking for or creating directory: {path}")
|
||||
os.makedirs(path, exist_ok=True)
|
||||
|
||||
|
||||
@ -178,9 +178,9 @@ def modifyFiles(config, destinationDirectory):
|
||||
raise ValueError(f"Text '{before_text}' not found in file: {filePath}")
|
||||
elif insert_text not in content:
|
||||
print(f" Inserting text before: {before_text}")
|
||||
content = content.replace(before_text, before_text + insert_text)
|
||||
content = content.replace(before_text, insert_text + before_text)
|
||||
else:
|
||||
print(f" Text already present after: {before_text}")
|
||||
print(f" Text already present before: {before_text}")
|
||||
errorList['modWarnings'] += 1
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user