Skip to content

Commit 6a26a65

Browse files
committed
C#: Remove a function.
1 parent 9a5e806 commit 6a26a65

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

csharp/autobuilder/Semmle.Autobuild/AutobuildOptions.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ public AutobuildOptions(IBuildActions actions)
3939
{
4040
RootDirectory = actions.GetCurrentDirectory();
4141
VsToolsVersion = actions.GetEnvironmentVariable(prefix + "VSTOOLS_VERSION");
42-
MsBuildArguments = actions.GetEnvironmentVariable(prefix + "MSBUILD_ARGUMENTS").AsStringWithExpandedEnvVarsMaybeNull(actions);
42+
MsBuildArguments = actions.GetEnvironmentVariable(prefix + "MSBUILD_ARGUMENTS")?.AsStringWithExpandedEnvVars(actions);
4343
MsBuildPlatform = actions.GetEnvironmentVariable(prefix + "MSBUILD_PLATFORM");
4444
MsBuildConfiguration = actions.GetEnvironmentVariable(prefix + "MSBUILD_CONFIGURATION");
4545
MsBuildTarget = actions.GetEnvironmentVariable(prefix + "MSBUILD_TARGET");
46-
DotNetArguments = actions.GetEnvironmentVariable(prefix + "DOTNET_ARGUMENTS").AsStringWithExpandedEnvVarsMaybeNull(actions);
46+
DotNetArguments = actions.GetEnvironmentVariable(prefix + "DOTNET_ARGUMENTS")?.AsStringWithExpandedEnvVars(actions);
4747
DotNetVersion = actions.GetEnvironmentVariable(prefix + "DOTNET_VERSION");
4848
BuildCommand = actions.GetEnvironmentVariable(prefix + "BUILD_COMMAND");
4949
Solution = actions.GetEnvironmentVariable(prefix + "SOLUTION").AsListWithExpandedEnvVars(actions, new string[0]);
@@ -107,9 +107,6 @@ public static string[] AsListWithExpandedEnvVars(this string? value, IBuildActio
107107

108108
static readonly Regex linuxEnvRegEx = new Regex(@"\$([a-zA-Z_][a-zA-Z_0-9]*)", RegexOptions.Compiled);
109109

110-
public static string? AsStringWithExpandedEnvVarsMaybeNull(this string? value, IBuildActions actions) =>
111-
value?.AsStringWithExpandedEnvVars(actions);
112-
113110
public static string AsStringWithExpandedEnvVars(this string value, IBuildActions actions)
114111
{
115112
if (string.IsNullOrEmpty(value))

0 commit comments

Comments
 (0)