container: root: add getter for dfi's root path
Adds impl/test for getting absolute path to all `dfi`'s `root` code.
This commit is contained in:
@@ -255,6 +255,16 @@ std::string get_env(const std::string& var)
|
||||
return std::string{env};
|
||||
}
|
||||
|
||||
//! \brief Get `dfi`'s root-related code directory
|
||||
//! \details Operating system path to where all `dfi` root-related code resides
|
||||
//! \return Operating system absolute path (with trailing slash)
|
||||
//! \exception type::RuntimeError if unable to get environment
|
||||
//! \since docker-finance 1.1.0
|
||||
std::string get_root_path()
|
||||
{
|
||||
return get_env("DOCKER_FINANCE_CONTAINER_REPO") + "/src/root/";
|
||||
}
|
||||
|
||||
//! \brief Execute a command in operating system shell
|
||||
//! \param cmd Operating system shell command [args]
|
||||
//! \return Return value of command
|
||||
|
||||
Reference in New Issue
Block a user