summaryrefslogtreecommitdiff
path: root/src/task.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/task.cc')
-rw-r--r--src/task.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/task.cc b/src/task.cc
index 1c6c233..8a9eefa 100644
--- a/src/task.cc
+++ b/src/task.cc
@@ -38,7 +38,12 @@ int Task::registerDepTasks(const std::list<std::shared_ptr<Task>>& tasks)
std::string Task::name() const
{
- return config.target;
+ // If config name is not set, use target instead.
+ if(config.name.empty())
+ {
+ return config.target;
+ }
+ return config.name;
}
bool Task::dirty()