Skip to content

Commit f29f7ef

Browse files
committed
fix(builder): add "z" flag for compressed tar archives
When a Procfile isn't present in a `git push` operation, builder tries to extract or fabricate one, but the tar commands would fail with "invalid tar magic" since the compression flag "z" was missing.
1 parent 68415ae commit f29f7ef

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • builder/rootfs/etc/confd/templates

builder/rootfs/etc/confd/templates/builder

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ if [ -f Procfile ]; then
140140
elif [ -f $TMP_DIR/slug.tgz ]; then
141141
# Sometimes, the buildpack will generate a Procfile instead of populating /bin/release
142142
# /bin/release was unofficially deprecated for declaring default process types
143-
if tar -tf $TMP_DIR/slug.tgz ./Procfile &> /dev/null;
143+
if tar -tzf $TMP_DIR/slug.tgz ./Procfile &> /dev/null;
144144
then
145-
PROCFILE="$(tar --to-stdout -xf $TMP_DIR/slug.tgz ./Procfile | yaml2json-procfile)"
145+
PROCFILE="$(tar --to-stdout -xzf $TMP_DIR/slug.tgz ./Procfile | yaml2json-procfile)"
146146
else
147-
PROCFILE=$(tar --to-stdout -xf $TMP_DIR/slug.tgz ./.release | extract-types)
147+
PROCFILE=$(tar --to-stdout -xzf $TMP_DIR/slug.tgz ./.release | extract-types)
148148
fi
149149
else
150150
PROCFILE="{}"

0 commit comments

Comments
 (0)