Skip to content

Commit

Permalink
update shell logic
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxtq committed Feb 11, 2025
1 parent 4d6d8f6 commit ae6728f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import cn.edu.tsinghua.iginx.exception.SessionException;
import cn.edu.tsinghua.iginx.session.Session;
import cn.edu.tsinghua.iginx.session.SessionExecuteSqlResult;
import cn.edu.tsinghua.iginx.utils.ShellRunner;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -167,7 +168,7 @@ public static int executeShellScript(String scriptPath, String... args) {
command = new String[args.length + 2];
command[1] = scriptPath;
System.arraycopy(args, 0, command, 2, args.length);
if (isOnWin) {
if (isOnWin && !ShellRunner.isCommandOnPath("bash")) {
command[0] = "C:/Program Files/Git/bin/bash.exe";
} else {
command[0] = "bash";
Expand Down

0 comments on commit ae6728f

Please sign in to comment.