diff --git a/scripts/acme_provider.py b/scripts/acme_provider.py index 4fbac07..cc34f90 100755 --- a/scripts/acme_provider.py +++ b/scripts/acme_provider.py @@ -170,7 +170,8 @@ def certbot_prefix(executable: str | None = None) -> list[str]: return [executable] managed_python = os.environ.get("RUSTPROXY_CERTBOT_PYTHON") if managed_python: - return [managed_python, "-I", "-m", "certbot"] + managed_certbot = str(Path(managed_python).with_name("certbot")) + return [managed_python, "-I", managed_certbot] discovered = shutil.which("certbot") if discovered: return [discovered] diff --git a/src/acme/runtime_env.rs b/src/acme/runtime_env.rs index bf385f5..64060d5 100644 --- a/src/acme/runtime_env.rs +++ b/src/acme/runtime_env.rs @@ -145,8 +145,9 @@ async fn managed_environment_valid( if !command_success(imports, Duration::from_secs(20), shutdown).await { return false; } + let certbot = venv_bin(directory).join("certbot"); let mut version = Command::new(&python); - version.args(["-I", "-m", "certbot", "--version"]); + version.arg("-I").arg(certbot).arg("--version"); command_success(version, Duration::from_secs(20), shutdown).await }