about [UPDATING (4 days)] [MOVED (15 hours)] [vuxml (3 hours)]summaryrefslograw-logtreecommitdiffstats
path: root/www/librewolf/files/patch-env-api-keys [up]
Last 15 commits to file "www/librewolf/files/patch-env-api-keys" in the last year: [ Last 15 commits to this file | All commits to this file ]
 
Commit messageAuthorDateFilesLines
* [ file ]www/librewolf: New portMartin Filla2023-01-21 18:34:48 +00001-0/+21


commit: (<title> <author> <date> etc.)
blob: a97a99d6b54a1bbaf4602bdad753dfc126c1365c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Accept API keys from environment like before bug 1294585

--- build/moz.configure/keyfiles.configure
+++ build/moz.configure/keyfiles.configure
@@ -19,6 +19,7 @@ def keyfile(desc, default=None, help=None, callback=lambda x: x):
     @checking("for the %s key" % desc, lambda x: x and x is not no_key)
     @imports(_from="__builtin__", _import="open")
     @imports(_from="__builtin__", _import="IOError")
+    @imports(_from="os", _import="environ")
     def keyfile(value):
         if value:
             try:
@@ -29,7 +30,7 @@ def keyfile(desc, default=None, help=None, callback=lambda x: x):
                     raise FatalCheckError("'%s' is empty." % value[0])
             except IOError as e:
                 raise FatalCheckError("'%s': %s." % (value[0], e.strerror))
-        return no_key
+        return environ.get("MOZ_%s_KEY" % desc.upper().replace(" ", "_")) or no_key
 
     return keyfile
 
This site is maintained by Jamie Landeg-Jones <jamie@catflap.org>, and is not an official FreeBSD project, nor is it endorsed by the FreeBSD team.