Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new tools.deployer:symlinks conf for deployers #14461

Merged

Conversation

memsharded
Copy link
Member

@memsharded memsharded commented Aug 10, 2023

Changelog: Feature: New tools.deployer:symlinks configuration to disable symlinks copy in deployers.
Changelog: Fix: Better error message when a built-in deployer failed to copy files.
Docs: conan-io/docs#3335

Close #14456
Close #14451

symlinks = conanfile.conf.get("tools.deployer:symlinks", check_type=bool, default=True)
try:
shutil.copytree(dep.package_folder, new_folder, symlinks=symlinks)
except Exception as e:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is quite difficult to test, to make it fail we could be mocking shutil.copytree because it is not possible for a test to force the symlinks error as that requires multi-platform

Copy link
Member

@AbrilRBS AbrilRBS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dont think it's worth to deal with testing, looks good to me as-is :)

@franramirez688 franramirez688 merged commit 8679356 into conan-io:release/2.0 Aug 11, 2023
@franramirez688
Copy link
Contributor

If the test was not there, the code didn't change enough to think of it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants