We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6724dea commit a75c827Copy full SHA for a75c827
csharp/autobuilder/Semmle.Autobuild.CSharp.Tests/BuildScripts.cs
@@ -116,10 +116,9 @@ bool IBuildActions.DirectoryExists(string dir)
116
117
string? IBuildActions.GetEnvironmentVariable(string name)
118
{
119
- if (!GetEnvironmentVariable.TryGetValue(name, out var ret))
120
- throw new ArgumentException("Missing GetEnvironmentVariable " + name);
121
-
122
- return ret;
+ if (!GetEnvironmentVariable.ContainsKey(name))
+ return null;
+ return GetEnvironmentVariable[name];
123
}
124
125
public string GetCurrentDirectory { get; set; } = "";
0 commit comments