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()
48
48
attempt = new BuildCommandRule ( DotNetRule . WithDotNet ) . Analyse ( this , false ) & CheckExtractorRun ( true ) ;
49
49
break ;
50
50
case CSharpBuildStrategy . Buildless :
51
- attempt = DotNetRule . WithDotNet ( this , env =>
51
+ attempt = DotNetRule . WithDotNet ( this , ( dotNetPath , env ) =>
52
52
{
53
53
// 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 ) ;
55
55
} ) ;
56
56
break ;
57
57
case CSharpBuildStrategy . MSBuild :
Original file line number Diff line number Diff line change @@ -8,6 +8,13 @@ namespace Semmle.Autobuild.CSharp
8
8
/// </summary>
9
9
internal class StandaloneBuildRule : IBuildRule < CSharpAutobuildOptions >
10
10
{
11
+ private readonly string ? dotNetPath ;
12
+
13
+ internal StandaloneBuildRule ( string ? dotNetPath )
14
+ {
15
+ this . dotNetPath = dotNetPath ;
16
+ }
17
+
11
18
public BuildScript Analyse ( IAutobuilder < CSharpAutobuildOptions > builder , bool auto )
12
19
{
13
20
BuildScript GetCommand ( string ? solution )
@@ -35,6 +42,12 @@ BuildScript GetCommand(string? solution)
35
42
cmd . Argument ( "--skip-nuget" ) ;
36
43
}
37
44
45
+ if ( ! string . IsNullOrEmpty ( this . dotNetPath ) )
46
+ {
47
+ cmd . Argument ( "--dotnet" ) ;
48
+ cmd . QuoteArgument ( this . dotNetPath ) ;
49
+ }
50
+
38
51
return cmd . Script ;
39
52
}
40
53
You can’t perform that action at this time.
0 commit comments