Skip to content

Commit ee28d5f

Browse files
committed
Updates exception thrown when accessing EnvironmentVariable to a more appropriate and adds an exception message
1 parent 78b09d5 commit ee28d5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GitVersionCore/BuildAgents/CodeBuild.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public void WithPropertyFile(string propertiesFileName)
2121
file = propertiesFileName;
2222
}
2323

24-
protected override string EnvironmentVariable => throw new InvalidOperationException();
24+
protected override string EnvironmentVariable => throw new NotSupportedException($"Accessing {nameof(EnvironmentVariable)} is not supported as {nameof(CodeBuild)} supports two environment variables for branch names.");
2525

2626
public override string GenerateSetVersionMessage(VersionVariables variables)
2727
{

0 commit comments

Comments
 (0)