Skip to content

Commit

Permalink
Cherry-pick 276051@main (f657af1). rdar://124542328
Browse files Browse the repository at this point in the history
    [webkitcorepy] Exit AutoInstall.install when disabled
    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

Canonical link: https://commits.webkit.org/272448.732@safari-7618-branch
  • Loading branch information
JonWBedard committed Mar 14, 2024
1 parent 2add35a commit 88863e8
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 88863e8

Please sign in to comment.