Merge pull request #30073 from lehasm/alexey-sm-cmake-generator-link-fix

cmake generator: unlink before creating a link
This commit is contained in:
alexey-milovidov 2021-10-13 23:08:31 +03:00 committed by GitHub
commit a163230f37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,7 +160,10 @@ def generate_cmake_flags_files() -> None:
"docs/ru/development/cmake-in-clickhouse.md"]
for lang in other_languages:
os.symlink(output_file_name, os.path.join(root_path, lang))
other_file_name = os.path.join(root_path, lang)
if os.path.exists(other_file_name):
os.unlink(other_file_name)
os.symlink(output_file_name, other_file_name)
if __name__ == '__main__':
generate_cmake_flags_files()