@@ -46,11 +46,6 @@ bool IBuildActions.FileExists(string file)
4646
4747 public IList < string > RunProcessIn { get ; } = new List < string > ( ) ;
4848 public IDictionary < string , int > RunProcess { get ; } = new Dictionary < string , int > ( ) ;
49-
50- /// <summary>
51- /// (process-exit code) pairs for commands that are executed during the assembly of the autobuild script.
52- /// </summary>
53- public IDictionary < string , int > RunProcessExecuteDuring { get ; } = new Dictionary < string , int > ( ) ;
5449 public IDictionary < string , string > RunProcessOut { get ; } = new Dictionary < string , string > ( ) ;
5550 public IDictionary < string , string > RunProcessWorkingDirectory { get ; } = new Dictionary < string , string > ( ) ;
5651 public HashSet < string > CreateDirectories { get ; } = new HashSet < string > ( ) ;
@@ -71,7 +66,7 @@ int IBuildActions.RunProcess(string cmd, string args, string? workingDirectory,
7166 if ( wd != workingDirectory )
7267 throw new ArgumentException ( $ "Unexpected RunProcessWorkingDirectory, got { wd ?? "null" } expected { workingDirectory ?? "null" } in { pattern } ") ;
7368
74- if ( ! RunProcess . TryGetValue ( pattern , out var ret ) && ! RunProcessExecuteDuring . TryGetValue ( pattern , out ret ) )
69+ if ( ! RunProcess . TryGetValue ( pattern , out var ret ) )
7570 throw new ArgumentException ( "Missing RunProcess " + pattern ) ;
7671
7772 return ret ;
@@ -86,7 +81,7 @@ int IBuildActions.RunProcess(string cmd, string args, string? workingDirectory,
8681 if ( wd != workingDirectory )
8782 throw new ArgumentException ( $ "Unexpected RunProcessWorkingDirectory, got { wd ?? "null" } expected { workingDirectory ?? "null" } in { pattern } ") ;
8883
89- if ( ! RunProcess . TryGetValue ( pattern , out var ret ) && ! RunProcessExecuteDuring . TryGetValue ( pattern , out ret ) )
84+ if ( ! RunProcess . TryGetValue ( pattern , out var ret ) )
9085 throw new ArgumentException ( "Missing RunProcess " + pattern ) ;
9186
9287 return ret ;
@@ -167,6 +162,10 @@ IEnumerable<string> IBuildActions.EnumerateDirectories(string dir)
167162
168163 bool IBuildActions . IsRunningOnAppleSilicon ( ) => IsRunningOnAppleSilicon ;
169164
165+ public bool IsMonoInstalled { get ; set ; }
166+
167+ bool IBuildActions . IsMonoInstalled ( ) => IsMonoInstalled ;
168+
170169 public string PathCombine ( params string [ ] parts )
171170 {
172171 return string . Join ( IsWindows ? '\\ ' : '/' , parts . Where ( p => ! string . IsNullOrWhiteSpace ( p ) ) ) ;
@@ -804,7 +803,7 @@ public void TestDirsProjWindows()
804803 [ Fact ]
805804 public void TestDirsProjLinux_WithMono ( )
806805 {
807- actions . RunProcessExecuteDuring [ @"mono --version" ] = 0 ;
806+ actions . IsMonoInstalled = true ;
808807
809808 actions . RunProcess [ @"nuget restore C:\Project/dirs.proj -DisableParallelProcessing" ] = 1 ;
810809 actions . RunProcess [ @"mono scratch/.nuget/nuget.exe restore C:\Project/dirs.proj -DisableParallelProcessing" ] = 0 ;
@@ -817,7 +816,7 @@ public void TestDirsProjLinux_WithMono()
817816 [ Fact ]
818817 public void TestDirsProjLinux_WithoutMono ( )
819818 {
820- actions . RunProcessExecuteDuring [ @"mono --version" ] = 1 ;
819+ actions . IsMonoInstalled = false ;
821820
822821 actions . RunProcess [ @"dotnet msbuild /t:restore C:\Project/dirs.proj" ] = 0 ;
823822 actions . RunProcess [ @"dotnet msbuild C:\Project/dirs.proj /t:rebuild" ] = 0 ;
0 commit comments