mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1789687: Fix the replace-regex action for moz.yaml r=jewilde
We accidently passed True when we want a non-regex replacement. This works for those, but not for the regex ones. Differential Revision: https://phabricator.services.mozilla.com/D156715
This commit is contained in:
parent
226adb5a86
commit
32188211aa
@ -45,7 +45,7 @@ def _replace_in_file(file, pattern, replacement, regex=False):
|
||||
|
||||
if newcontents == contents:
|
||||
raise Exception(
|
||||
"Could not find %s in %s to replace with %s" % (pattern, file, replacement)
|
||||
"Could not find '%s' in %s to %sreplace with '%s'" % (pattern, file, "regex-" if regex else "", replacement)
|
||||
)
|
||||
|
||||
with open(file, "w") as f:
|
||||
@ -512,7 +512,7 @@ class VendorManifest(MozbuildObject):
|
||||
file,
|
||||
update["pattern"],
|
||||
replacement,
|
||||
regex=update["action"] == "replace-in-file",
|
||||
regex=update["action"] == "replace-in-file-regex",
|
||||
)
|
||||
elif update["action"] == "delete-path":
|
||||
path = self.get_full_path(update["path"])
|
||||
|
Loading…
Reference in New Issue
Block a user