Skip to content

Commit

Permalink
support config.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Nate Koenig <[email protected]>
  • Loading branch information
nkoenig committed Apr 8, 2024
1 parent 574a13a commit 34258eb
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/ClientConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,14 @@ ClientConfig::ClientConfig() : dataPtr(new ClientConfigPrivate)
this->SetCacheLocation(gzFuelPath);
}

std::string configFile = common::joinPaths(this->CacheLocation(), "config.yaml");
if (gz::common::exists(configFile))
this->LoadConfig(configFile);
std::string configYamlFile = common::joinPaths(this->CacheLocation(),
"config.yaml");
std::string configYmlFile = common::joinPaths(this->CacheLocation(),
"config.yml");
if (gz::common::exists(configYamlFile))
this->LoadConfig(configYamlFile);
else if (gz::common::exists(configYmlFile))
this->LoadConfig(configYmlFile);
}

//////////////////////////////////////////////////
Expand Down

0 comments on commit 34258eb

Please sign in to comment.