allow nested resources
This solution doesn't really make me happy, but does seem to work. It sorts the resources by the length of the string representing their destination. Since any nested resource must contain another resource's name in its path, it seems that should work, but there should be a better way to do this.
This commit is contained in:
parent
cc8c783bb2
commit
fcdf08e4d7
@ -697,7 +697,9 @@ def _expand_archive(stage, name=self.name):
|
||||
##########
|
||||
# Stage resources in appropriate path
|
||||
resources = self._get_resources()
|
||||
for resource in resources:
|
||||
# TODO: this is to allow nested resources, a better solution would be
|
||||
# good
|
||||
for resource in sorted(resources, key=lambda res: len(res.destination)):
|
||||
stage = resource.fetcher.stage
|
||||
_expand_archive(stage, resource.name)
|
||||
# Turn placement into a dict with relative paths
|
||||
|
Loading…
Reference in New Issue
Block a user