Skip to content

Commit

Permalink
configure script for MacOS local mode: Fixes #221
Browse files Browse the repository at this point in the history
  • Loading branch information
johnaohara authored and willr3 committed Jul 9, 2024
1 parent e59dbc3 commit 4455751
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/io/hyperfoil/tools/qdup/Host.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public class Host {
//worked on old fedora but not on fedora 39
//public static final List<String> LOCAL_LINUX_CONNECT_SHELL = Arrays.asList("script", "-q", "/dev/null","/bin/bash");
public static final List<String> LOCAL_LINUX_CONNECT_SHELL = Arrays.asList("script", "-q","-c","/bin/bash","/dev/null");
public static final List<String> LOCAL_MACOS_CONNECT_SHELL = Arrays.asList("script", "-q", "/dev/null", "/bin/bash");
//LOCAL_EXEC uses System.getRuntime().exec(...)
public static final List<String> LOCAL_LINUX_UPLOAD = Arrays.asList("cp","-r","${{source}}","${{destination}}");
public static final List<String> LOCAL_LINUX_DOWNLOAD = Arrays.asList("cp","-r","${{source}}","${{destination}}");
Expand Down Expand Up @@ -284,7 +285,11 @@ public Host(String userName,String hostName,String password,int port,String prom
this.startContainer=Collections.EMPTY_LIST;
this.startConnectedContainer=Collections.EMPTY_LIST;
this.stopContainer=Collections.EMPTY_LIST;
this.connectShell= LOCAL_LINUX_CONNECT_SHELL;
if (System.getProperty("os.name").toUpperCase().contains("MAC")) {
this.connectShell = LOCAL_MACOS_CONNECT_SHELL;
} else {
this.connectShell = LOCAL_LINUX_CONNECT_SHELL;
}
this.removeContainer=Collections.EMPTY_LIST;
this.exec=Collections.EMPTY_LIST;//uses system.getRuntime().exec()
}else{//ssh, remember when that was the only use case?
Expand Down

0 comments on commit 4455751

Please sign in to comment.