File tree Expand file tree Collapse file tree 4 files changed +15
-14
lines changed Expand file tree Collapse file tree 4 files changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ async function pullWithDockerBinary(
5454 "using local docker binary credentials. the credentials you provided will be ignored" ,
5555 ) ;
5656 }
57- await docker . pullCli ( targetImage , { platform} ) ;
57+ await docker . pullCli ( targetImage , { platform } ) ;
5858 await docker . save ( targetImage , saveLocation ) ;
5959 return true ;
6060 } catch ( err ) {
@@ -79,7 +79,9 @@ function handleDockerPullError(err: string, platform?: string) {
7979 "manifest unknown" ,
8080 ] ;
8181 if ( unknownManifestConditions . some ( ( value ) => err . includes ( value ) ) ) {
82- throw new Error ( `The image does not exist for ${ platform ?? "the current platform" } ` ) ;
82+ throw new Error (
83+ `The image does not exist for ${ platform ?? "the current platform" } ` ,
84+ ) ;
8385 }
8486
8587 if ( err . includes ( "invalid reference format" ) ) {
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 @@ -14,11 +14,11 @@ function generatePathMatcher(
1414 globsExclude : string [ ] ,
1515) : ( filePath : string ) => boolean {
1616 return ( filePath : string ) : boolean => {
17- if ( globsExclude . some ( glob => minimatch ( filePath , glob ) ) ) {
17+ if ( globsExclude . some ( ( glob ) => minimatch ( filePath , glob ) ) ) {
1818 return false ;
1919 }
20-
21- return globsInclude . some ( glob => minimatch ( filePath , glob ) ) ;
20+
21+ return globsInclude . some ( ( glob ) => minimatch ( filePath , glob ) ) ;
2222 } ;
2323}
2424
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