Skip to content

Commit e39d625

Browse files
committed
Use slightly more defensive COPY parsing
1 parent 14d2b34 commit e39d625

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

generate-stackbrew-library.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,19 @@ dirCommit() {
3636
local dir="$1"; shift
3737
(
3838
cd "$dir"
39-
fileCommit \
40-
Dockerfile \
41-
$(git show HEAD:./Dockerfile | awk '
39+
files="$(
40+
git show HEAD:./Dockerfile | awk '
4241
toupper($1) == "COPY" {
4342
for (i = 2; i < NF; i++) {
43+
if ($i ~ /^--from=/) {
44+
next
45+
}
4446
print $i
4547
}
4648
}
47-
')
49+
'
50+
)"
51+
fileCommit Dockerfile $files
4852
)
4953
}
5054

0 commit comments

Comments
 (0)