feat: always install
Some checks failed
continuous-integration/drone/push Build is failing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2024-09-07 23:48:45 +02:00
parent 195d772beb
commit 065b0c5847
Signed by: kjuulh
GPG Key ID: 9AA7BC13CE474394
3 changed files with 9 additions and 5 deletions

View File

@ -32,7 +32,7 @@ sqlx = { version = "0.7.3", features = [
] } ] }
chrono = "0.4.34" chrono = "0.4.34"
git2 = "0.18.3" git2 = "0.18.3"
rustls = { version = "0.23.12", features = ["ring"] } rustls = { version = "0.23.12" }
[build-dependencies] [build-dependencies]
tonic-build = "0.12.0" tonic-build = "0.12.0"

View File

@ -10,6 +10,14 @@ pub type FluxReleaserGrpcClient = Arc<Mutex<FluxReleaserClient<Channel>>>;
pub async fn new_client(registry: impl Into<String>) -> anyhow::Result<FluxReleaserGrpcClient> { pub async fn new_client(registry: impl Into<String>) -> anyhow::Result<FluxReleaserGrpcClient> {
let registry: String = registry.into(); let registry: String = registry.into();
static INIT: std::sync::Once = std::sync::Once::new();
INIT.call_once(|| {
rustls::crypto::aws_lc_rs::default_provider()
.install_default()
.unwrap();
});
let channel = if registry.starts_with("https") { let channel = if registry.starts_with("https") {
let tls = ClientTlsConfig::new(); let tls = ClientTlsConfig::new();

View File

@ -9,10 +9,6 @@ pub mod services;
pub async fn run() -> anyhow::Result<()> { pub async fn run() -> anyhow::Result<()> {
dotenv::dotenv().ok(); dotenv::dotenv().ok();
rustls::crypto::ring::default_provider()
.install_default()
.expect("Failed to install rustls crypto provider");
Command::run().await?; Command::run().await?;
Ok(()) Ok(())