Skip to content

Commit 37c5109

Browse files
author
Matthew Fisher
committed
fix(build.sh): switch to build_root before running hooks
1 parent 25a8e0d commit 37c5109

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

rootfs/builder/build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ fi
142142
## Run pre-compile hook
143143

144144
if [[ -f "$build_root/bin/pre-compile" ]]; then
145+
pushd "$build_root" &> /dev/null
145146
"$build_root/bin/pre-compile"
147+
popd &>/dev/null
146148
fi
147149

148150
## Buildpack compile
@@ -154,7 +156,9 @@ fi
154156
## Run post-compile hook
155157

156158
if [[ -f "$build_root/bin/post-compile" ]]; then
159+
pushd "$build_root" &> /dev/null
157160
"$build_root/bin/post-compile"
161+
popd &>/dev/null
158162
fi
159163

160164
## Display process types

0 commit comments

Comments
 (0)