diff options
Diffstat (limited to 'src/buildtool/common/action.hpp')
-rw-r--r-- | src/buildtool/common/action.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/buildtool/common/action.hpp b/src/buildtool/common/action.hpp index e9d4581d..350a1d2b 100644 --- a/src/buildtool/common/action.hpp +++ b/src/buildtool/common/action.hpp @@ -29,6 +29,7 @@ class Action { Action(std::string action_id, std::vector<std::string> command, + std::string cwd, std::map<std::string, std::string> env_vars, std::optional<std::string> may_fail, bool no_cache, @@ -36,6 +37,7 @@ class Action { std::map<std::string, std::string> execution_properties) : id_{std::move(action_id)}, command_{std::move(command)}, + cwd_{std::move(cwd)}, env_{std::move(env_vars)}, may_fail_{std::move(may_fail)}, no_cache_{no_cache}, @@ -47,6 +49,7 @@ class Action { std::map<std::string, std::string> env_vars) : Action(std::move(action_id), std::move(command), + "", std::move(env_vars), std::nullopt, false, @@ -64,6 +67,8 @@ class Action { return command_; } + [[nodiscard]] auto Cwd() const -> std::string { return cwd_; } + [[nodiscard]] auto Env() const& noexcept -> std::map<std::string, std::string> { return env_; @@ -98,6 +103,7 @@ class Action { private: ActionIdentifier id_{}; std::vector<std::string> command_{}; + std::string cwd_{}; std::map<std::string, std::string> env_{}; bool is_tree_{}; std::optional<std::string> may_fail_{}; |