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

patterns aren't like tar #33

Open
codefromthecrypt opened this issue Feb 22, 2024 · 0 comments
Open

patterns aren't like tar #33

codefromthecrypt opened this issue Feb 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@codefromthecrypt
Copy link
Contributor

Describe the bug
In tar, you can extract something by its base directory, while here you have to know the path containing files and use a glob.

To Reproduce

We can do this:

$ car --created-by-pattern='Application Slice: .*' -tvf springcloud/spring-cloud-kubernetes-discoveryserver:3.1.0 'workspace/META-INF/*'
-rw-r--r--	582	Jan  1 08:00:01	workspace/META-INF/MANIFEST.MF

but it won't get any subdirs, and also you can't just pass the subdir you want.

$ car --created-by-pattern='Application Slice: .*' -tvf springcloud/spring-cloud-kubernetes-discoveryserver:3.1.0 workspace/META-INF
error: workspace/META-INF not found in layer

Expected behavior

$ car --created-by-pattern='Application Slice: .*' -tvf springcloud/spring-cloud-kubernetes-discoveryserver:3.1.0 workspace/META-INF
-rw-r--r--	582	Jan  1 08:00:01	/workspace/META-INF/MANIFEST.MF
-rw-r--r--	99	Jan  1 08:00:01	/workspace/META-INF/maven/org.springframework.cloud/spring-cloud-kubernetes-discoveryserver/pom.properties
-rw-r--r--	3991	Jan  1 08:00:01	/workspace/META-INF/maven/org.springframework.cloud/spring-cloud-kubernetes-discoveryserver/pom.xml
-rw-r--r--	66	Jan  1 08:00:01	/workspace/META-INF/services/java.nio.file.spi.FileSystemProvider

Additional context

We probably don't need globbing, and should do normal tar-like path matching that works with either exact files or anything in a directory.

@codefromthecrypt codefromthecrypt added the bug Something isn't working label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant