Skip to content

Commit

Permalink
Allow overriding of default application path directory
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Jan 31, 2024
1 parent db40918 commit 914b572
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nano/secure/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ static std::vector<std::filesystem::path> all_unique_paths;
std::filesystem::path nano::working_path (nano::networks network)
{
auto result (nano::app_path ());

if (auto path_override = nano::get_env ("NANO_APP_PATH"))
{
result = *path_override;
std::cerr << "Application path overridden by NANO_APP_PATH environment variable: " << result << std::endl;
}

switch (network)
{
case nano::networks::invalid:
Expand Down

0 comments on commit 914b572

Please sign in to comment.