瀏覽代碼

Adjust "diff-pr.sh" to ignore "COPY --from=" (since it cannot reasonably access files from the referenced image/stage context)

Tianon Gravi 6 年之前
父節點
當前提交
4b4a88f075
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      diff-pr.sh

+ 3 - 0
diff-pr.sh

@@ -167,6 +167,9 @@ copy-tar() {
 			$(awk '
 				toupper($1) == "COPY" || toupper($1) == "ADD" {
 					for (i = 2; i < NF; i++) {
+						if ($i ~ /^--from=/) {
+							next
+						}
 						if ($i !~ /^--chown=/) {
 							print $i
 						}