cmSystemTools: Return KWSys Status from CreateLink and CreateSymlink

This commit is contained in:
Brad King
2021-04-15 12:31:41 -04:00
parent 27b5dc35a6
commit 7f89053953
3 changed files with 22 additions and 20 deletions

View File

@@ -2949,9 +2949,11 @@ bool HandleCreateLinkCommand(std::vector<std::string> const& args,
// Check if the command requires a symbolic link.
if (arguments.Symbolic) {
completed = cmSystemTools::CreateSymlink(fileName, newFileName, &result);
completed = static_cast<bool>(
cmSystemTools::CreateSymlink(fileName, newFileName, &result));
} else {
completed = cmSystemTools::CreateLink(fileName, newFileName, &result);
completed = static_cast<bool>(
cmSystemTools::CreateLink(fileName, newFileName, &result));
}
// Check if copy-on-error is enabled in the arguments.