diff --git a/lets_do_dns/acme_dns_auth/authenticate.py b/lets_do_dns/acme_dns_auth/authenticate.py index 7e915af..48be60d 100644 --- a/lets_do_dns/acme_dns_auth/authenticate.py +++ b/lets_do_dns/acme_dns_auth/authenticate.py @@ -41,9 +41,8 @@ def _run_post_cmd(self): if self._env.post_cmd: run(self._env.post_cmd, env={'CERTBOT_HOSTNAME': self._env.fqdn, - 'PATH': ["/bin", "/sbin", - "/usr/bin", "/usr/sbin", - "/usr/local/bin", "/usr/local/sbin"]}) + 'PATH': ("/bin:/sbin:/usr/bin:/usr/sbin:" + "/usr/local/bin:/usr/local/sbin")}) def _create_resource(self): self._resource.create() diff --git a/tests/unit/acme_dns_auth/authenticate/test_cleanup_stage.py b/tests/unit/acme_dns_auth/authenticate/test_cleanup_stage.py index 3601713..a8c772a 100644 --- a/tests/unit/acme_dns_auth/authenticate/test_cleanup_stage.py +++ b/tests/unit/acme_dns_auth/authenticate/test_cleanup_stage.py @@ -75,6 +75,5 @@ def test_passes_postcmd_to_run(mocker, fqdn): mock_run.assert_called_once_with( 'test-program --help', env={'CERTBOT_HOSTNAME': fqdn, - 'PATH': ["/bin", "/sbin", - "/usr/bin", "/usr/sbin", - "/usr/local/bin", "/usr/local/sbin"]}) + 'PATH': ("/bin:/sbin:/usr/bin:/usr/sbin:" + "/usr/local/bin:/usr/local/sbin")})