Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

Commit

Permalink
When checking helper executables, make sure that they actually execut…
Browse files Browse the repository at this point in the history
…ed correctly. Sorry translators, this introduces a new string.

git-svn-id: svn://svn.pgadmin.org/trunk@6527 a7884b65-44f6-0310-8a51-81a127f17b15
  • Loading branch information
dpage committed Aug 2, 2007
1 parent 7d8e785 commit d9ad348
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions pgadmin/utils/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,11 @@ bool pgAppMinimumVersion(const wxString &cmd, const int majorVer, const int mino
{
wxArrayString output;

wxExecute(cmd + wxT(" --version"), output, 0);
if (wxExecute(cmd + wxT(" --version"), output, 0) != 0)
{
wxLogError(_("Failed to execute: %s --version"), cmd);
return false;
}

wxString version = output[0].AfterLast(' ');
long actualMajor = 0, actualMinor = 0;
Expand Down Expand Up @@ -1085,7 +1089,11 @@ bool isPgApp(const wxString &app)

wxArrayString output;

wxExecute(app + wxT(" --version"), output, 0);
if (wxExecute(app + wxT(" --version"), output, 0) != 0)
{
wxLogError(_("Failed to execute: %s --version"), app);
return false;
}

if (output[0].Contains(wxT("PostgreSQL")))
return true;
Expand All @@ -1100,7 +1108,11 @@ bool isEdbApp(const wxString &app)

wxArrayString output;

wxExecute(app + wxT(" --version"), output, 0);
if (wxExecute(app + wxT(" --version"), output, 0) != 0)
{
wxLogError(_("Failed to execute: %s --version"), app);
return false;
}

if (output[0].Contains(wxT("EnterpriseDB")))
return true;
Expand Down

0 comments on commit d9ad348

Please sign in to comment.