Skip to content

Commit

Permalink
crash when there are no access token
Browse files Browse the repository at this point in the history
  • Loading branch information
valdisz committed Sep 6, 2019
1 parent efca0ec commit 75532c2
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -42,6 +42,11 @@ protected override void PreStart()
var buildId = int.Parse(Environment.GetEnvironmentVariable("BUILD_BUILDID"));
var accessToken = Environment.GetEnvironmentVariable("DEVOPS_ACCESS_TOKEN");

if (string.IsNullOrWhiteSpace(accessToken))
{
throw new Exception("Access token was not provided");
}

_azureDevOpsReporter = Context.ActorOf(Props.Create(() => new AzureDevOpsReporterActor(_suiteName, collectionUri, teamProject, buildId, accessToken)));
_consoleReporter = Context.ActorOf(Props.Create(() => new ConsoleReporterActor(_suiteName)));

Expand Down

0 comments on commit 75532c2

Please sign in to comment.