mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Use TryGetValue
This commit is contained in:
@@ -116,9 +116,8 @@ namespace Semmle.Autobuild.CSharp.Tests
|
||||
|
||||
string? IBuildActions.GetEnvironmentVariable(string name)
|
||||
{
|
||||
if (!GetEnvironmentVariable.ContainsKey(name))
|
||||
return null;
|
||||
return GetEnvironmentVariable[name];
|
||||
GetEnvironmentVariable.TryGetValue(name, out var ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public string GetCurrentDirectory { get; set; } = "";
|
||||
|
||||
Reference in New Issue
Block a user