mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-25 16:02:11 +00:00
fix: add support for result.json for powershell
This commit is contained in:
@@ -379,6 +379,21 @@ $env:PSModulePath = \"{}:$PSModulePathBackup\"",
|
||||
)
|
||||
.await?;
|
||||
|
||||
let result_json_path = format!("{job_dir}/result.json");
|
||||
if let Ok(metadata) = tokio::fs::metadata(&result_json_path).await {
|
||||
if metadata.len() > 0 {
|
||||
return Ok(read_file(&result_json_path).await?);
|
||||
}
|
||||
}
|
||||
|
||||
let result_out_path = format!("{job_dir}/result.out");
|
||||
if let Ok(metadata) = tokio::fs::metadata(&result_out_path).await {
|
||||
if metadata.len() > 0 {
|
||||
let result = read_file_content(&result_out_path).await?;
|
||||
return Ok(to_raw_value(&json!(result)));
|
||||
}
|
||||
}
|
||||
|
||||
let result_out_path2 = format!("{job_dir}/result2.out");
|
||||
if tokio::fs::metadata(&result_out_path2).await.is_ok() {
|
||||
let result = read_file_content(&result_out_path2)
|
||||
|
||||
Reference in New Issue
Block a user