From e00fcfc5b115fd5ceba1660b91c79c6c567cae9e Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Thu, 28 Nov 2024 12:21:17 +0700 Subject: [PATCH] use HgRunner instead of trying to locate mercurial manually --- .../FwLiteProjectSync.Tests/Fixtures/MercurialTestHelper.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/FwLite/FwLiteProjectSync.Tests/Fixtures/MercurialTestHelper.cs b/backend/FwLite/FwLiteProjectSync.Tests/Fixtures/MercurialTestHelper.cs index afccd122a..e0ec3f816 100644 --- a/backend/FwLite/FwLiteProjectSync.Tests/Fixtures/MercurialTestHelper.cs +++ b/backend/FwLite/FwLiteProjectSync.Tests/Fixtures/MercurialTestHelper.cs @@ -1,3 +1,4 @@ +using Chorus.VcsDrivers.Mercurial; using SIL.CommandLineProcessing; using SIL.PlatformUtilities; using SIL.Progress; @@ -6,12 +7,11 @@ namespace FwLiteProjectSync.Tests.Fixtures; public static class MercurialTestHelper { - public static string HgCommand => - Path.Combine("Mercurial", Platform.IsWindows ? "hg.exe" : "hg"); + private static readonly NullProgress NullProgress = new NullProgress(); private static string RunHgCommand(string repoPath, string args) { - var result = CommandLineRunner.Run(HgCommand, args, repoPath, 120, new NullProgress()); + var result = HgRunner.Run(args, repoPath, 120, NullProgress); if (result.ExitCode == 0) return result.StandardOutput; throw new Exception( $"hg {args} failed.\nStdOut: {result.StandardOutput}\nStdErr: {result.StandardError}");