Skip to content

Commit 06a6e6a

Browse files
committed
fix (core): 修复获取命令代码问题
1 parent 047f997 commit 06a6e6a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src-tauri/src/plugins/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub trait LanguagePlugin: Send + Sync {
7878
if let Some(config) = self.get_config() {
7979
if let Some(run_cmd) = &config.run_command {
8080
return if let Some(path) = file_path {
81-
let final_cmd = if self.get_execute_home().is_some() {
81+
if self.get_execute_home().is_some() {
8282
// 如果有执行主目录,在整个命令前面加 ./
8383
let cmd_with_file = run_cmd.replace("$filename", path);
8484
if cmd_with_file.starts_with("./") {
@@ -88,8 +88,7 @@ pub trait LanguagePlugin: Send + Sync {
8888
}
8989
} else {
9090
run_cmd.replace("$filename", path)
91-
};
92-
final_cmd
91+
}
9392
} else {
9493
let base_cmd = run_cmd
9594
.split_whitespace()

0 commit comments

Comments
 (0)