Skip to content

Commit

Permalink
set relative path support to configuration files for build release
Browse files Browse the repository at this point in the history
  • Loading branch information
vbilopav committed Apr 20, 2024
1 parent 34591fb commit 182d54b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion NpgsqlRest/NpgsqlRestOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public NpgsqlRestOptions() : this(null)
public bool LogEndpointCreatedInfo { get; set; } = logEndpointCreatedInfo;

/// <summary>
/// When this value is true, all created endpoint events will be logged as information with method and path. Set to false to disable logging this information.
/// When this value is true, all changes in the endpoint properties that are set from the comment annotations will be logged as warnings.
/// </summary>
public bool LogAnnotationSetInfo { get; set; } = logAnnotationSetInfo;

Expand Down
3 changes: 2 additions & 1 deletion NpgsqlRestTestWebApi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,14 @@ static IConfigurationRoot BuildConfiguration(string[] args)
{
var configBuilder = new ConfigurationBuilder().AddEnvironmentVariables();
IConfigurationRoot config;

if (args.Length > 0)
{
foreach (var arg in args)
{
if (arg.StartsWith('-') is false)
{
configBuilder.AddJsonFile(arg, optional: false);
configBuilder.AddJsonFile(Path.GetFullPath(arg, Environment.CurrentDirectory), optional: false);
}
}
config = configBuilder.Build();
Expand Down

0 comments on commit 182d54b

Please sign in to comment.