Move GITHUB_PASSWORD env var check out of VersionRepoUpdater.
This commit is contained in:
parent
d0a1e239dc
commit
e28450e5a3
3 changed files with 24 additions and 22 deletions
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
|
@ -28,5 +29,16 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
public static string EnsureVariable(string variableName)
|
||||
{
|
||||
string value = Environment.GetEnvironmentVariable(variableName);
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
throw new BuildFailureException($"'{variableName}' environment variable was not found.");
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue