Conversation
Paul-Ferrell
previously approved these changes
Mar 21, 2024
| copystat=utils.make_umask_filtered_copystat(umask), | ||
| symlinks=True) | ||
| source_copy = self._config.get('source_copy') | ||
| if source_copy.lower() == 'true': |
Collaborator
There was a problem hiding this comment.
You can use the utils.py str_bool here.
Comment on lines
198
to
209
| def symlinktree(source_directory, destination_directory): | ||
| for root, dirs, files in os.walk(source_directory): | ||
| for file in files: | ||
| src_path = os.path.join(root, file) | ||
| rel_path = os.path.relpath(src_path, source_directory) | ||
| dst_path = os.path.join(destination_directory, rel_path) | ||
|
|
||
| # Create | ||
| os.makedirs(os.path.dirname(dst_path), exist_ok=True) | ||
| os.symlink(src_path, dst_path) | ||
|
|
||
|
|
Collaborator
There was a problem hiding this comment.
I started write that you should mimic how this is done in builder.py with maybe_symlink_copy, but with some of the options you need to add this way is better.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Code review checklist:
Closes #745