Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
radical committed Aug 7, 2024
1 parent 173a640 commit 1775a96
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Aspire.Hosting/Dcp/DcpOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,11 @@ public void Configure(DcpOptions options)
var dcpPublisherConfiguration = configuration.GetSection(DcpPublisher);
var assemblyMetadata = appOptions.Assembly?.GetCustomAttributes<AssemblyMetadataAttribute>();

string? dcpDirEnvVar = Environment.GetEnvironmentVariable("ASPIRE_DCP_DIR");
if (!string.IsNullOrEmpty(dcpDirEnvVar))
// Find dcp tools path in the following order:
// 1. Environment variable ASPIRE_DCP_DIR
// 2. Configuration value
// 3. Assembly metadata
if (Environment.GetEnvironmentVariable("ASPIRE_DCP_DIR") is var dcpDirEnvVar && !string.IsNullOrEmpty(dcpDirEnvVar))
{
SetDcpPathsFromDcpDir(dcpDirEnvVar);
}
Expand Down

0 comments on commit 1775a96

Please sign in to comment.