fix run_command and finish generate_ca_files

This commit is contained in:
SpikeHD
2022-05-22 21:32:03 -07:00
parent 3891bbbe3d
commit 94e0faba6c
3 changed files with 22 additions and 6 deletions

View File

@@ -15,11 +15,11 @@ pub fn run_program(path: String) {
}
#[tauri::command]
pub fn run_command(command: String) -> String {
pub fn run_command(command: String) {
// Run the specified command.
let output = if cfg!(target_os = "windows") {
Command::new("cmd")
.args(["/C", command])
.args(["/C", command.as_str()])
.output()
.expect("failed to execute process")
} else {
@@ -29,8 +29,6 @@ pub fn run_command(command: String) -> String {
.output()
.expect("failed to execute process")
};
output.stdout.to_string()
}
#[tauri::command]