File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -248,11 +248,11 @@ function layersWithLatestFileModifications(
248248 return extractedLayers ;
249249}
250250
251- /**
252- * check if a file is 'whited out', which is shown by
253- * prefixing the filename with a .wh.
254- * https://www.madebymikal.com/interpreting-whiteout-files-in-docker-image-layers/
255- */
251+ /**
252+ * check if a file is 'whited out', which is shown by
253+ * prefixing the filename with a .wh.
254+ * https://www.madebymikal.com/interpreting-whiteout-files-in-docker-image-layers/
255+ */
256256export function isWhitedOutFile ( filename : string ) {
257257 return filename . includes ( ".wh." ) ;
258258}
Original file line number Diff line number Diff line change 1- import { getContentAsString } from "../../../lib/extractor" ;
1+ import { getContentAsString , isWhitedOutFile } from "../../../lib/extractor" ;
22import { ExtractAction , ExtractedLayers } from "../../../lib/extractor/types" ;
3- import { isWhitedOutFile } from "../../../lib/extractor" ;
43
54describe ( "index" , ( ) => {
65 test ( "getContentAsString() does matches when a pattern is used in the extract action" , async ( ) => {
@@ -38,11 +37,11 @@ describe("isWhitedOutFile", () => {
3837 expect ( isWhitedOutFile ( "/etc/wh.hosts" ) ) . toBe ( false ) ;
3938 expect ( isWhitedOutFile ( "/etc/.whosts" ) ) . toBe ( false ) ;
4039 expect ( isWhitedOutFile ( "/etc/whhosts" ) ) . toBe ( false ) ;
41-
40+
4241 // dots in wrong places
4342 expect ( isWhitedOutFile ( "/etc/.w.h.hosts" ) ) . toBe ( false ) ;
4443 expect ( isWhitedOutFile ( "/etc/..wh..hosts" ) ) . toBe ( false ) ;
45-
44+
4645 // case sensitive
4746 expect ( isWhitedOutFile ( "/etc/.WH.hosts" ) ) . toBe ( false ) ;
4847 expect ( isWhitedOutFile ( "/etc/.Wh.hosts" ) ) . toBe ( false ) ;
You can’t perform that action at this time.
0 commit comments