Skip to content

Commit

Permalink
[webkitcorepy] Exit AutoInstall.install when disabled
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=270920
rdar://124542328

Reviewed by Elliott Williams.

AutoInstall.install will fail if the autoinstaller is disabled.
Programs shouldn't call AutoInstall.install if the autoinstaller
is disabled, but the program may still complete, so we should
just print an error message.

* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(AutoInstall.install): Exit and print error if AutoInstall is disabled.

Canonical link: https://commits.webkit.org/276051@main
  • Loading branch information
JonWBedard committed Mar 13, 2024
1 parent 6099df8 commit f657af1
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,9 @@ def register(cls, package, local=False):

@classmethod
def install(cls, package):
if not cls.enabled():
sys.stderr.write("Autoinstaller disabled, but 'install' called\n")
return None
if isinstance(package, str):
# we want this to throw if it hasn't been previously registered; in the case
# that this is being called from cls.find_module it should always exist
Expand Down

0 comments on commit f657af1

Please sign in to comment.