Merge pull request #23 from Seeker14491/ci

Set up GitHub Actions lints and checks
This commit is contained in:
SpikeHD
2022-07-15 21:11:06 -07:00
committed by GitHub
25 changed files with 328 additions and 149 deletions

View File

@@ -11,8 +11,7 @@ pub fn run_program(path: String) {
#[tauri::command]
pub fn run_command(program: &str, args: Vec<&str>) {
cmd(program, args).run()
.expect("Failed to run command");
cmd(program, args).run().expect("Failed to run command");
}
#[tauri::command]
@@ -24,7 +23,10 @@ pub fn run_jar(path: String, execute_in: String, java_path: String) {
};
// Open the program from the specified path.
match open::with(format!("/k cd /D \"{}\" & {}", &execute_in, &command), "C:\\Windows\\System32\\cmd.exe") {
match open::with(
format!("/k cd /D \"{}\" & {}", &execute_in, &command),
"C:\\Windows\\System32\\cmd.exe",
) {
Ok(_) => (),
Err(e) => println!("Failed to open jar ({} from {}): {}", &path, &execute_in, e),
};
@@ -39,7 +41,6 @@ pub fn open_in_browser(url: String) {
};
}
#[tauri::command]
pub fn install_location() -> String {
let mut exe_path = std::env::current_exe().unwrap();