Skip to content

Commit

Permalink
Minor custom action optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
robmen committed Feb 27, 2021
1 parent 3adccec commit f217241
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/ca/wixdepca.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,16 @@ static HRESULT EnsureAbsentDependents(
UINT cDependents = 0;
PMSIHANDLE hDependencyRec = NULL;

// Skip the dependent check if the WixDependencyProvider table is missing (no dependency providers).
hr = WcaTableExists(L"WixDependencyProvider");
if (S_FALSE == hr)
{
WcaLog(LOGMSG_STANDARD, "Skipping the dependents check since no dependency providers are authored.");
ExitFunction1(hr = S_OK);
}

ExitOnFailure(hr, "Failed to check if the WixDependencyProvider table exists.");

// Split the IGNOREDEPENDENCIES property for use below if set. If it is "ALL", then quit now.
hr = SplitIgnoredDependents(&sdIgnoredDependents);
ExitOnFailure(hr, "Failed to get the ignored dependents.");
Expand All @@ -297,16 +307,6 @@ static HRESULT EnsureAbsentDependents(
hr = S_OK;
}

// Skip the dependent check if the WixDependencyProvider table is missing (no dependency providers).
hr = WcaTableExists(L"WixDependencyProvider");
if (S_FALSE == hr)
{
WcaLog(LOGMSG_STANDARD, "Skipping the dependents check since no dependency providers are authored.");
ExitFunction();
}

ExitOnFailure(hr, "Failed to check if the WixDependencyProvider table exists.");

// Set the registry hive to use depending on install context.
hkHive = fMachineContext ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;

Expand Down

0 comments on commit f217241

Please sign in to comment.