summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/execution_api')
-rw-r--r--src/buildtool/execution_api/local/local_action.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/buildtool/execution_api/local/local_action.cpp b/src/buildtool/execution_api/local/local_action.cpp
index d42dcdd6..d3ad7fd9 100644
--- a/src/buildtool/execution_api/local/local_action.cpp
+++ b/src/buildtool/execution_api/local/local_action.cpp
@@ -185,6 +185,18 @@ auto LocalAction::StageFile(std::filesystem::path const& target_path,
return false;
}
+ if (info.type == ObjectType::Symlink) {
+ auto to =
+ FileSystemManager::ReadContentAtPath(*blob_path, ObjectType::File);
+ if (not to) {
+ logger_.Emit(LogLevel::Error,
+ "could not read content of symlink {}",
+ (*blob_path).string());
+ return false;
+ }
+ return FileSystemManager::CreateSymlink(*to, target_path);
+ }
+
return FileSystemManager::CreateDirectory(target_path.parent_path()) and
FileSystemManager::CreateFileHardlink(*blob_path, target_path);
}