From 9735317ae8bfdf34289877eb65fa969334eb3ef4 Mon Sep 17 00:00:00 2001 From: Aaron Fiore Date: Tue, 21 Oct 2025 21:45:14 -0700 Subject: [PATCH] container: plugins: root: fix example3()'s shell The spawned shell needs its sourced environment and aliases. Resolves: sh: line 1: dfi: command not found Error in : std::runtime_error caught: FILE = "/home/business/docker-finance/plugins/root/example.cc" LINE = 125 WHAT = "command failed" --- container/plugins/root/example.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/container/plugins/root/example.cc b/container/plugins/root/example.cc index 19234bc..c4ed7a1 100644 --- a/container/plugins/root/example.cc +++ b/container/plugins/root/example.cc @@ -122,7 +122,10 @@ void example3() auto exec_cmd = [&make_cmd](const std::string& cmd) { // shell 0 = success - THROW_IF(common::exec(make_cmd(cmd)), std::runtime_error, "command failed") + THROW_IF( + common::exec("bash -i -c '" + make_cmd(cmd) + "'"), + std::runtime_error, + "command failed") }; std::cout << "\nImporting journals...\n";