fix(cli): install default rustls crypto provider to prevent panic

This commit is contained in:
Mae Morella authored and GitHub committed 2026-08-30 04:36:35 +08:00
1 parent 4ac362453f
commit 694c344278
3 files changed
+5

No files matched your search

+3
View File
@@ -178,6 +178,9 @@ async fn main() -> ExitCode {
}
async fn run(argv: Vec<String>) -> Result<String, (CliError, bool)> {
// Set aws_lc_rs as the process-level default CryptoProvider to prevent a rustls panic
let _ = rustls::crypto::aws_lc_rs::default_provider().install_default();
let wants_json = argv.iter().any(|arg| arg == "--json");
let flags = parse_flags(&argv).map_err(|error| (error, wants_json))?;
let json_output = flags.format == OutputFormat::Json;