carvel-dev / carvel-dev/vendir
Using newRootPath and legalPaths together result in missing LICENSE file
- Dominant language
- Go
- Stars
- 399
- Forks
- 73
- Avg merge
- 2h 53m
- Merged PRs (30d)
- 2
Description
**What steps did you take:**
[A clear and concise description steps that can be used to reproduce the problem.]
A typical GitHub project generally includes its license at the root of the project. When specifying the newRootPath, this will adjust the root path of the project after the download and since the legalPath likely exists outside of newRootPath, the legalPath ends up missing.
Consider this config:
```yaml
---
apiVersion: vendir.k14s.io/v1alpha1
kind: Config
directories:
# vertical pod autoscaler
- path: source/cnpo.tanzulabs.vmware.com/tenancy/vertical-pod-autoscaler
contents:
- path: vendor
git:
url: https://github.com/kubernetes/autoscaler.git
ref: vertical-pod-autoscaler/v0.9.2
includePaths:
- vertical-pod-autoscaler/deploy/*.yaml
excludePaths:
- vertical-pod-autoscaler/deploy/kustomization.yaml
- vertical-pod-autoscaler/deploy/vpa-beta-crd.yaml
- vertical-pod-autoscaler/deploy/vpa-beta2-crd.yaml
- vertical-pod-autoscaler/deploy/vpa-crd.yaml
newRootPath: vertical-pod-autoscaler/deploy
legalPaths:
- LICENSE
```
**What happened:**
[A small description of the issue]
Directory was appropriately downloaded, however the legalPaths were missing because (assumption) it existed outside of the newRootPath
**What did you expect:**
[A description of what was expected]
The legalPaths would be placed within the newRootPath specified.
**Anything else you would like to add:**
[Additional information that will assist in solving the issue.]
**Environment:**
- vendir version (execute `vendir --version`):
```
vendir --version
vendir version 0.19.0
Succeeded
```
- OS (e.g. from `/etc/os-release`): MacOS
---
Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help working on this issue.
Contributor guide
Assessment
This issue has not been assessed yet.