Skip to content

Commit ee603ce

Browse files
GRU v2.3-dev [1111] (fix, but not fix 🤬}
1 parent 5645885 commit ee603ce

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

‎src/downloader.rs

+14-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub fn download(
3737
}
3838

3939
if downloader == "tcpu" {
40-
execute_tcpu_download_script(main_func::read_downloadtool_config());
40+
execute_tcpu_download_script(main_func::read_downloadtool_config(), &asset, &current_dir);
4141
} else {
4242
match downloader {
4343
"curl" => {
@@ -237,12 +237,23 @@ pub fn download(
237237
Ok(())
238238
}
239239

240-
fn execute_tcpu_download_script(tool_name: &str) -> io::Result<()> {
240+
fn execute_tcpu_download_script(
241+
tool_name: &str,
242+
asset: &str,
243+
application_path: &str
244+
) -> io::Result<()> {
241245
let script_path: PathBuf = ["..", "..", "..", "Scripts", &format!("download_{}.bat", tool_name)]
242246
.iter()
243247
.collect();
244248
Command::new("cmd")
245-
.args(&["/C", script_path.to_str().unwrap()])
249+
.args(
250+
&[
251+
"/C",
252+
script_path.to_str().unwrap(),
253+
asset,
254+
&format!("{}app.downloaded", application_path),
255+
]
256+
)
246257
.current_dir(std::env::current_dir()?)
247258
.spawn()?
248259
.wait()?;

0 commit comments

Comments
 (0)