File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1212 public class MercurialLocation
1313 {
1414 private static string _pathToMercurialFolder ;
15+ private static string _hgExe = Platform . IsWindows ? "hg.exe" : "hg" ;
1516
1617 /// <summary>
1718 /// Clients can set this if they have their own private copy of Mercurial (recommended)
@@ -31,7 +32,7 @@ public static string PathToMercurialFolder
3132 return ;
3233 }
3334 RequireThat . Directory ( value ) . Exists ( ) ;
34- string expectedHgLocation = Path . Combine ( value , Platform . IsWindows ? "hg.exe" : "hg" ) ;
35+ string expectedHgLocation = Path . Combine ( value , _hgExe ) ;
3536 if ( ! File . Exists ( expectedHgLocation ) )
3637 {
3738 throw new FileNotFoundException ( expectedHgLocation ) ;
@@ -50,8 +51,8 @@ public static string PathToHgExecutable
5051 GuessAtLocationIfNotSetAlready ( ) ;
5152
5253 if ( string . IsNullOrEmpty ( _pathToMercurialFolder ) )
53- return "hg" ; //rely on the PATH
54- return Path . Combine ( _pathToMercurialFolder , "hg" ) ;
54+ return _hgExe ; //rely on the PATH
55+ return Path . Combine ( _pathToMercurialFolder , _hgExe ) ;
5556 }
5657 }
5758
You can’t perform that action at this time.
0 commit comments