File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -269,6 +269,7 @@ TSecureShellCmd = class(TObject)
269269 procedure Connect ;
270270 constructor Create(Connection: TDBConnection);
271271 destructor Destroy; override;
272+ function SshpassPath : String;
272273 end ;
273274
274275 TSQLFunction = class (TPersistent)
@@ -1034,6 +1035,15 @@ destructor TSecureShellCmd.Destroy;
10341035 inherited ;
10351036end ;
10361037
1038+ function TSecureShellCmd.SshpassPath : String;
1039+ begin
1040+ { $IFDEF DARWIN}
1041+ // See https://www.heidisql.com/forum.php?t=44716
1042+ Result := ' /opt/homebrew/bin/sshpass' ;
1043+ { $ELSE}
1044+ Result := ' ' ;
1045+ { $ENDIF}
1046+ end ;
10371047
10381048procedure TSecureShellCmd.Connect ;
10391049var
@@ -1085,7 +1095,7 @@ procedure TSecureShellCmd.Connect;
10851095 SshCmd := SshCmd + ' -N -L ' + IntToStr(FConnection.Parameters.SSHLocalPort) + ' :' + FConnection.Parameters.Hostname + ' :' + IntToStr(FConnection.Parameters.Port);
10861096
10871097 if not EnvSshpass.IsEmpty then begin
1088- SshCmd := ' sshpass -e ' + SshCmd;
1098+ SshCmd := SshpassPath + ' -e ' + SshCmd;
10891099 EnvList := TStringList.Create;
10901100 for i := 0 to GetEnvironmentVariableCount - 1 do
10911101 EnvList.Add(GetEnvironmentString(i));
You can’t perform that action at this time.
0 commit comments