mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 15:44:35 +01:00
Merge pull request #23 from Seeker14491/ci
Set up GitHub Actions lints and checks
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user