Skip to content

Commit

Permalink
Merge pull request #120 from PlasticSCM/1005566-check-shelve-and-switch
Browse files Browse the repository at this point in the history
Fix RunCommand() to Append() to OutErrorMessages instead of erasing its content
  • Loading branch information
juliomaqueda authored May 28, 2024
2 parents e8c885d + aba827c commit 16b151e
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Source/PlasticSourceControl/Private/PlasticSourceControlUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,18 @@ bool RunCommand(const FString& InCommand, const TArray<FString>& InParameters, c

const bool bResult = PlasticSourceControlShell::RunCommand(InCommand, InParameters, InFiles, Results, Errors);

Results.ParseIntoArray(OutResults, PlasticSourceControlShell::pchDelim, true);
Errors.ParseIntoArray(OutErrorMessages, PlasticSourceControlShell::pchDelim, true);
if (!Results.IsEmpty())
{
TArray<FString> ParsedResults;
Results.ParseIntoArray(ParsedResults, PlasticSourceControlShell::pchDelim, true);
OutResults.Append(MoveTemp(ParsedResults));
}
if (!Errors.IsEmpty())
{
TArray<FString> ParsedErrors;
Errors.ParseIntoArray(ParsedErrors, PlasticSourceControlShell::pchDelim, true);
OutErrorMessages.Append(MoveTemp(ParsedErrors));
}

return bResult;
}
Expand Down

0 comments on commit 16b151e

Please sign in to comment.