File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Semmle.Autobuild.CSharp.Tests Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -116,9 +116,7 @@ bool IBuildActions.DirectoryExists(string dir)
116
116
117
117
string ? IBuildActions . GetEnvironmentVariable ( string name )
118
118
{
119
- if ( ! GetEnvironmentVariable . TryGetValue ( name , out var ret ) )
120
- throw new ArgumentException ( "Missing GetEnvironmentVariable " + name ) ;
121
-
119
+ GetEnvironmentVariable . TryGetValue ( name , out var ret ) ;
122
120
return ret ;
123
121
}
124
122
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ namespace Semmle.Autobuild.CSharp
11
11
/// </summary>
12
12
public class CSharpAutobuildOptions : AutobuildOptionsShared
13
13
{
14
+ private const string buildModeEnvironmentVariable = "CODEQL_EXTRACTOR_CSHARP_BUILD_MODE" ;
14
15
private const string extractorOptionPrefix = "CODEQL_EXTRACTOR_CSHARP_OPTION_" ;
15
16
16
17
public bool Buildless { get ; }
@@ -25,7 +26,8 @@ public class CSharpAutobuildOptions : AutobuildOptionsShared
25
26
public CSharpAutobuildOptions ( IBuildActions actions ) : base ( actions )
26
27
{
27
28
Buildless = actions . GetEnvironmentVariable ( lgtmPrefix + "BUILDLESS" ) . AsBool ( "buildless" , false ) ||
28
- actions . GetEnvironmentVariable ( extractorOptionPrefix + "BUILDLESS" ) . AsBool ( "buildless" , false ) ;
29
+ actions . GetEnvironmentVariable ( extractorOptionPrefix + "BUILDLESS" ) . AsBool ( "buildless" , false ) ||
30
+ actions . GetEnvironmentVariable ( buildModeEnvironmentVariable ) ? . ToLower ( ) == "none" ;
29
31
}
30
32
}
31
33
You can’t perform that action at this time.
0 commit comments