Move GITHUB_PASSWORD env var check out of VersionRepoUpdater.

This commit is contained in:
Eric Erhardt 2016-05-18 14:14:50 -05:00
parent d0a1e239dc
commit e28450e5a3
3 changed files with 24 additions and 22 deletions

View file

@ -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;
}
}
}