Example #1
0
        protected void ValidateClientVersions(ITracer tracer, GSDEnlistment enlistment, ServerGSDConfig gvfsConfig, bool showWarnings)
        {
            this.CheckGitVersion(tracer, enlistment, out string gitVersion);
            enlistment.SetGitVersion(gitVersion);

            this.GetGSDHooksPathAndCheckVersion(tracer, out string hooksVersion);
            enlistment.SetGSDHooksVersion(hooksVersion);

            string errorMessage = null;
            bool   errorIsFatal = false;

            if (!this.TryValidateGSDVersion(enlistment, tracer, gvfsConfig, out errorMessage, out errorIsFatal))
            {
                if (errorIsFatal)
                {
                    this.ReportErrorAndExit(tracer, errorMessage);
                }
                else if (showWarnings)
                {
                    this.Output.WriteLine();
                    this.Output.WriteLine(errorMessage);
                    this.Output.WriteLine();
                }
            }
        }