Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Commit

Permalink
fix copy-paste (#1043)
Browse files Browse the repository at this point in the history
  • Loading branch information
RayMMond authored May 29, 2021
1 parent e8c463b commit febd172
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Microsoft.Tye.Core/ConfigModel/ConfigApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ public void Validate()

foreach (var envVar in service.Configuration)
{
context = new ValidationContext(service);
if (!Validator.TryValidateObject(service, context, results, validateAllProperties: true))
context = new ValidationContext(envVar);
if (!Validator.TryValidateObject(envVar, context, results, validateAllProperties: true))
{
throw new TyeYamlException(
$"Environment variable '{envVar.Name}' of service '{service.Name}' validation failed." + Environment.NewLine +
Expand All @@ -129,8 +129,8 @@ public void Validate()

foreach (var volume in service.Volumes)
{
context = new ValidationContext(service);
if (!Validator.TryValidateObject(service, context, results, validateAllProperties: true))
context = new ValidationContext(volume);
if (!Validator.TryValidateObject(volume, context, results, validateAllProperties: true))
{
throw new TyeYamlException(
$"Volume '{volume.Source}' of service '{service.Name}' validation failed." + Environment.NewLine +
Expand Down

0 comments on commit febd172

Please sign in to comment.