Skip to content

Commit

Permalink
fix: added file name
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhexists committed Sep 4, 2024
1 parent 5532940 commit 178146f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/src/commands/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ pub fn save_csr_certificate(
}
} else {
let output_path: PathBuf = std::env::current_dir()?;
let file_name: PathBuf = output_path.join(format!("{}.pem", name));
let file_name: PathBuf = output_path.join(format!("csr-{}.pem", name));
let file_name_str: Option<&str> = file_name.to_str();
if let Some(file_name_str) = file_name_str {
CAReq::save_certificate_to_file(&ca_req_certificate, file_name_str)?;
Expand Down
8 changes: 7 additions & 1 deletion core/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,20 @@ fn main() {
);
std::process::exit(1);
}

if !domains.is_empty() && csr.is_some() {
eprintln!("Error: `-d` (domains) and `--csr` cannot be used together.");
std::process::exit(1);
}

if request && csr.is_some() {
eprint!("Error: `--req-only` and `csr` are incompatible. You can't generate requests from a request certificate.");
std::process::exit(1);
}

if request && install {
eprint!("Error: `--req-only` and `csr` are incompatible. You can't generate requests from a request certificate.");
//CORRECT THIS
eprint!("Error: `--req-only` and `install` are incompatible. You can't generate requests from a request certificate.");
std::process::exit(1);
}

Expand Down

0 comments on commit 178146f

Please sign in to comment.