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

copy() debug output #15513

Merged
merged 1 commit into from
Jan 24, 2024
Merged

Conversation

memsharded
Copy link
Member

@memsharded memsharded commented Jan 24, 2024

Changelog: Feature: Add verbose debug information (with -vvv) for conan.tools.files.copy() calls.
Docs: Omit

Close #4690

@memsharded memsharded added this to the 2.1 milestone Jan 24, 2024
@czoido czoido merged commit 8f86d38 into conan-io:develop2 Jan 24, 2024
2 checks passed
@memsharded memsharded deleted the feature/debug_output_copy branch January 24, 2024 15:11
@iaavo
Copy link

iaavo commented Feb 12, 2024

The line os.makedirs(os.path.dirname(abs_dst_name), exist_ok=True) is throwing an exception in my case now.

Example to reproduce:

from conan import ConanFile
from conan.tools.files import copy

class BasicConanfile(ConanFile):
    name    = "test"
    version = "1.2.3"

    def generate(self):
        copy(self, "index.rst", "../library_a/source", ".")

Throws the exception:

ERROR: conanfile.py (test/1.2.3): Error in generate() method, line 11
        copy(self, "index.rst", "../library_a/source", ".")
        FileNotFoundError: [WinError 3] The system cannot find the path specified: ''

@memsharded
Copy link
Member Author

The copy() function is mostly expecting absolute paths, I'd suggest to check that

However, I'll also revert this, as there is some risk of breaking for little benefit

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

Successfully merging this pull request may close these issues.

copy should have the option to log all files matched/copied by a call
4 participants