Skip to content

Commit f531487

Browse files
committed
Don't delete the build directory root
Since otherwise once Heroku builds are run from `/app`, builds will output warnings due to the `/app` root being read only: ``` remote: -----> Subdir buildpack app detected ... remote: cleaning build dir /app remote: rm: cannot remove '/app': Read-only file system ``` Fixes #9.
1 parent 5485d38 commit f531487

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bin/compile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/usr/bin/env bash
22
# bin/compile <build-dir> <cache-dir> <env-dir>
33

4+
# Ensure wildcards in globs match dotfiles too.
5+
shopt -s dotglob
6+
47
BUILD_DIR=${1:-}
58
CACHE_DIR=${2:-}
69
ENV_DIR=${3:-}
@@ -16,9 +19,7 @@ if [ -f $ENV_DIR/PROJECT_PATH ]; then
1619
echo " moving working dir: $PROJECT_PATH to $TMP_DIR"
1720
cp -R $BUILD_DIR/$PROJECT_PATH/. $TMP_DIR/
1821
echo " cleaning build dir $BUILD_DIR"
19-
rm -rf $BUILD_DIR
20-
echo " recreating $BUILD_DIR"
21-
mkdir -p $BUILD_DIR
22+
rm -rf $BUILD_DIR/*
2223
echo " copying preserved work dir from cache $TMP_DIR to build dir $BUILD_DIR"
2324
cp -R $TMP_DIR/. $BUILD_DIR/
2425
echo " cleaning tmp dir $TMP_DIR"

0 commit comments

Comments
 (0)