From f5595da7882be63c4cc4d0009c60d4f0b5609b89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Thu, 1 Feb 2024 00:11:17 +0100 Subject: [PATCH] Allow overriding of default application path directory --- nano/secure/utility.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nano/secure/utility.cpp b/nano/secure/utility.cpp index 0ed99eb9b1..3edf3c44f4 100644 --- a/nano/secure/utility.cpp +++ b/nano/secure/utility.cpp @@ -9,6 +9,13 @@ static std::vector 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: