|
@@ -1,6 +1,7 @@
|
|
|
|
|
+use crate::commands::config::{get_git_mirror_config, get_nodejs_mirror_config};
|
|
|
use crate::commands::AppState;
|
|
use crate::commands::AppState;
|
|
|
-use crate::utils::http::get_client;
|
|
|
|
|
-use crate::utils::shell::run_shell_hidden;
|
|
|
|
|
|
|
+use crate::utils::http::{get_client, HttpRequest};
|
|
|
|
|
+use crate::utils::shell::{run_program, run_shell_hidden, CommandOptions};
|
|
|
use futures::StreamExt;
|
|
use futures::StreamExt;
|
|
|
use serde::{Deserialize, Serialize};
|
|
use serde::{Deserialize, Serialize};
|
|
|
use std::io::Write;
|
|
use std::io::Write;
|
|
@@ -566,7 +567,7 @@ where
|
|
|
async fn install_vscode<F, C>(
|
|
async fn install_vscode<F, C>(
|
|
|
_app: &tauri::AppHandle,
|
|
_app: &tauri::AppHandle,
|
|
|
_state: &State<'_, AppState>,
|
|
_state: &State<'_, AppState>,
|
|
|
- _options: &InstallOptions,
|
|
|
|
|
|
|
+ options: &InstallOptions,
|
|
|
emit_status: F,
|
|
emit_status: F,
|
|
|
is_cancelled: C,
|
|
is_cancelled: C,
|
|
|
) -> Result<InstallResult, String>
|
|
) -> Result<InstallResult, String>
|
|
@@ -752,7 +753,7 @@ where
|
|
|
async fn install_git<F, C>(
|
|
async fn install_git<F, C>(
|
|
|
_app: &tauri::AppHandle,
|
|
_app: &tauri::AppHandle,
|
|
|
_state: &State<'_, AppState>,
|
|
_state: &State<'_, AppState>,
|
|
|
- _options: &InstallOptions,
|
|
|
|
|
|
|
+ options: &InstallOptions,
|
|
|
emit_status: F,
|
|
emit_status: F,
|
|
|
is_cancelled: C,
|
|
is_cancelled: C,
|
|
|
) -> Result<InstallResult, String>
|
|
) -> Result<InstallResult, String>
|