SRombauts / UEGitPlugin

Unreal Engine 5 Git LFS 2 Source Control Plugin (beta)
http://srombauts.github.io/UEGitPlugin
MIT License
811 stars 165 forks source link

Avoid throwing a warning when checking for git capabilities #125

Closed ccarvalheiro closed 4 years ago

ccarvalheiro commented 4 years ago

When checking for git availability, we check the cat-file command capabilities with git cat-file -h. This command exits with code 129 (expected behavior). This logs a warning in the output log, which when cooking content ends up in the list of warnings at the end.

This pull request adds support for custom return codes in RunCommandInternalRaw so that we can pass in an expected non zero code. Didn't cascade the argument from the higher-level methods for now. The argument defaults to zero to maintain the same behavior.

SRombauts commented 4 years ago

Hi, I really like that, simple and efficient!