mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-19 01:02:17 +02:00
Only return filepath.SkipDir for directories
From the docs on filepath.SkipDir: > If the function returns SkipDir when invoked on a non-directory file, Walk skips the remaining files in the containing directory This was causing the bug in #457. Since the file `/etc/hosts` was in the whitelist, when filepath.SkipDir was called the entire etc directory was skipped. This change only returns filepath.SkipDir on directories.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# Make sure that whitelisting (specifically, filepath.SkipDir) works correctly, and that /var/test/testfile and
|
||||
# /etc/test/testfile end up in the final image
|
||||
|
||||
FROM debian@sha256:38236c068c393272ad02db100e09cac36a5465149e2924a035ee60d6c60c38fe
|
||||
|
||||
RUN mkdir -p /var/test \
|
||||
&& mkdir -p /etc/test \
|
||||
&& touch /var/test/testfile \
|
||||
&& touch /etc/test/testfile \
|
||||
&& ls -lah /var/test \
|
||||
&& ls -lah /etc/test;
|
||||
Reference in New Issue
Block a user