]> git.seodisparate.com - AnotherAURHelper/commitdiff
Clear gpg-agent cache so bad psswds don't pass
authorStephen Seo <seo.disparate@gmail.com>
Fri, 6 Oct 2023 06:54:03 +0000 (15:54 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Fri, 6 Oct 2023 06:54:03 +0000 (15:54 +0900)
update.py

index 9041a45189e1e8b3e700db26c5aa207bdbb51795..46ac150079264b09a1384017c07a2e5ebdb7881c 100755 (executable)
--- a/update.py
+++ b/update.py
@@ -1616,6 +1616,14 @@ def test_gpg_passphrase(
         tempnf.write(b"Test file content")
         tempnf.flush()
         try:
+            # Clear gpg password cache so that incorrect passwords don't pass.
+            subprocess.run(
+                ("/usr/bin/env", "gpg-connect-agent", "reloadagent", "/bye"),
+                check=True,
+                stdout=subprocess.DEVNULL,
+                stderr=subprocess.DEVNULL,
+                env={"GNUPGHOME": signing_gpg_dir},
+            )
             subprocess.run(
                 (
                     "/usr/bin/env",