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)
116116
117117 string ? IBuildActions . GetEnvironmentVariable ( string name )
118118 {
119- if ( ! GetEnvironmentVariable . TryGetValue ( name , out var ret ) )
120- throw new ArgumentException ( "Missing GetEnvironmentVariable " + name ) ;
121-
119+ GetEnvironmentVariable . TryGetValue ( name , out var ret ) ;
122120 return ret ;
123121 }
124122
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ namespace Semmle.Autobuild.CSharp
1111 /// </summary>
1212 public class CSharpAutobuildOptions : AutobuildOptionsShared
1313 {
14+ private const string buildModeEnvironmentVariable = "CODEQL_EXTRACTOR_CSHARP_BUILD_MODE" ;
1415 private const string extractorOptionPrefix = "CODEQL_EXTRACTOR_CSHARP_OPTION_" ;
1516
1617 public bool Buildless { get ; }
@@ -25,7 +26,8 @@ public class CSharpAutobuildOptions : AutobuildOptionsShared
2526 public CSharpAutobuildOptions ( IBuildActions actions ) : base ( actions )
2627 {
2728 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" ;
2931 }
3032 }
3133
You can’t perform that action at this time.
0 commit comments