fix: actually use the Cloudflare environment token

This commit is contained in:
ptrcnull 2024-06-12 12:06:41 +02:00
parent c8c8275da3
commit 35a27b7685
Signed by: ptrcnull
GPG key ID: 411F7B30801DD9CA

View file

@ -22,7 +22,7 @@ class CloudflareHandler(Handler):
def run(self, args: list[str]) -> Any:
env = os.environ.copy()
env['CF_API_TOKEN'] = self.secret
res = subprocess.run(['flarectl', '--json'] + args, check=True, stdout=subprocess.PIPE)
res = subprocess.run(['flarectl', '--json'] + args, check=True, stdout=subprocess.PIPE, env=env)
return json.loads(res.stdout)
def create(self, record_name: str, record_value: str) -> None: