File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
csharp/autobuilder/Semmle.Autobuild.CSharp Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -48,10 +48,10 @@ public override BuildScript GetBuildScript()
4848 attempt = new BuildCommandRule ( DotNetRule . WithDotNet ) . Analyse ( this , false ) & CheckExtractorRun ( true ) ;
4949 break ;
5050 case CSharpBuildStrategy . Buildless :
51- attempt = DotNetRule . WithDotNet ( this , env =>
51+ attempt = DotNetRule . WithDotNet ( this , ( dotNetPath , env ) =>
5252 {
5353 // No need to check that the extractor has been executed in buildless mode
54- return new StandaloneBuildRule ( ) . Analyse ( this , false ) ;
54+ return new StandaloneBuildRule ( dotNetPath ) . Analyse ( this , false ) ;
5555 } ) ;
5656 break ;
5757 case CSharpBuildStrategy . MSBuild :
Original file line number Diff line number Diff line change @@ -8,6 +8,13 @@ namespace Semmle.Autobuild.CSharp
88 /// </summary>
99 internal class StandaloneBuildRule : IBuildRule < CSharpAutobuildOptions >
1010 {
11+ private readonly string ? dotNetPath ;
12+
13+ internal StandaloneBuildRule ( string ? dotNetPath )
14+ {
15+ this . dotNetPath = dotNetPath ;
16+ }
17+
1118 public BuildScript Analyse ( IAutobuilder < CSharpAutobuildOptions > builder , bool auto )
1219 {
1320 BuildScript GetCommand ( string ? solution )
@@ -35,6 +42,12 @@ BuildScript GetCommand(string? solution)
3542 cmd . Argument ( "--skip-nuget" ) ;
3643 }
3744
45+ if ( ! string . IsNullOrEmpty ( this . dotNetPath ) )
46+ {
47+ cmd . Argument ( "--dotnet" ) ;
48+ cmd . QuoteArgument ( this . dotNetPath ) ;
49+ }
50+
3851 return cmd . Script ;
3952 }
4053
You can’t perform that action at this time.
0 commit comments