(subject: string[], startsWith: string[])
| 114 | const buildWithoutCacheCommand = `${commandBase} --image-name ${nonCachedImageName} --no-cache`; |
| 115 | |
| 116 | function arrayStartsWithArray(subject: string[], startsWith: string[]) { |
| 117 | if (subject.length < startsWith.length) { |
| 118 | return false; |
| 119 | } |
| 120 | for (let i = 0; i < startsWith.length; i++) { |
| 121 | if (subject[i] !== startsWith[i]) { |
| 122 | return false; |
| 123 | } |
| 124 | } |
| 125 | return true; |
| 126 | } |
| 127 | |
| 128 | function haveCommonEntries(arr1: string[], arr2: string[]) { |
| 129 | return arr1.every(item => arr2.includes(item)); |