Skip to content

Commit 2a16a68

Browse files
committed
fix (core): 修复由于系统命令代码执行失败后未反馈错误
1 parent 6e1a992 commit 2a16a68

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

src-tauri/src/execution.rs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -146,17 +146,10 @@ pub async fn execute_code(
146146
);
147147

148148
error!("执行代码 -> 调用插件 [ {} ] 失败: {}", request.language, e);
149-
return Ok(ExecutionResult {
150-
success: false,
151-
stdout: String::new(),
152-
stderr: format!(
153-
"{} interpreter not found. Please install {} and ensure it's in your PATH.\n\nError: {}",
154-
request.language, request.language, e
155-
),
156-
execution_time,
157-
timestamp,
158-
language: request.language,
159-
});
149+
return Err(format!(
150+
"{} interpreter not found. Please install {} and ensure it's in your PATH.\n\nError: {}",
151+
request.language, request.language, e
152+
));
160153
}
161154
};
162155

0 commit comments

Comments
 (0)