From 9b1679c62340a03598dd1ab9b3b9a0a5cd489d0e Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Sat, 27 Aug 2016 08:48:16 -0700 Subject: [PATCH] fix(build.sh): switch to build_root before running hooks --- rootfs/builder/build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rootfs/builder/build.sh b/rootfs/builder/build.sh index 95ce77c..589c059 100755 --- a/rootfs/builder/build.sh +++ b/rootfs/builder/build.sh @@ -161,7 +161,9 @@ fi ## Run pre-compile hook if [[ -f "$build_root/bin/pre-compile" ]]; then + pushd "$build_root" &> /dev/null "$build_root/bin/pre-compile" + popd &>/dev/null fi ## Buildpack compile @@ -173,7 +175,9 @@ fi ## Run post-compile hook if [[ -f "$build_root/bin/post-compile" ]]; then + pushd "$build_root" &> /dev/null "$build_root/bin/post-compile" + popd &>/dev/null fi ## Display process types