Skip to content

Commit

Permalink
Fix 'cm checkconnection' to never call it with a --server argument th…
Browse files Browse the repository at this point in the history
…at creates issues with authentication

Use instead the new 'cm checkconnection <repserverspec>' if the version of Plastic is recent enough.
  • Loading branch information
SRombautsU committed Nov 27, 2024
1 parent 21b5058 commit 3588a98
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,10 @@ bool RunCheckConnection(FString& OutWorkspaceSelector, FString& OutBranchName, F
TArray<FString> Parameters;
if (PlasticSourceControlUtils::GetWorkspaceInfo(OutWorkspaceSelector, OutBranchName, OutRepositoryName, OutServerUrl, OutErrorMessages))
{
Parameters.Add(FString::Printf(TEXT("--server=%s"), *OutServerUrl));
if ((FPlasticSourceControlModule::Get().GetProvider().GetPlasticScmVersion() >= PlasticSourceControlVersions::CheckConnection))
{
Parameters.Add(OutServerUrl);
}
}
return PlasticSourceControlUtils::RunCommand(TEXT("checkconnection"), Parameters, TArray<FString>(), OutInfoMessages, OutErrorMessages);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,8 @@ namespace PlasticSourceControlVersions
// https://plasticscm.com/download/releasenotes/11.0.16.8445 (2024/02/22)
static const FSoftwareVersion WorkingBranch(TEXT("11.0.16.8445"));

// 11.0.16.9055 checkconnection learned a new optional argument <repserverspec>.
// https://plasticscm.com/download/releasenotes/11.0.16.9055 (2024/11/28)
static const FSoftwareVersion CheckConnection(TEXT("11.0.16.9055"));

} // namespace PlasticSourceControlVersions

0 comments on commit 3588a98

Please sign in to comment.