Skip to content

Commit dd54f04

Browse files
committed
Correct delete source check to use variable rather than hardcoded path
1 parent 4563d8e commit dd54f04

File tree

1 file changed

+4
-4
lines changed
  • modules/s2i/bash/artifacts/usr/local/s2i

1 file changed

+4
-4
lines changed

modules/s2i/bash/artifacts/usr/local/s2i/assemble

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if [ "$S2I_ENABLE_JLINK" = "true" ]; then
2929
log_info "S2I_JLINK_TEMP_PATH does not exist, creating ${S2I_JLINK_TEMP_PATH}"
3030
mkdir -pm 775 "${S2I_JLINK_TEMP_PATH}"
3131
fi
32-
32+
3333
source "${JBOSS_CONTAINER_JAVA_JLINK_MODULE}/mkdeps.sh"
3434
echo "Invoking mkdeps"
3535
generate_deps || {
@@ -61,8 +61,8 @@ if [ "$S2I_ENABLE_JLINK" = "true" ]; then
6161
fi
6262

6363
if [ "$S2I_DELETE_SOURCE" == "true" ]; then
64-
if [ -n "$(find /tmp/jlink -maxdepth 0 -type d ! -empty 2> /dev/null)" ]; then
65-
log_info "Cleaning up temporary file directory /tmp/jlink"
66-
rm -rf /tmp/jlink
64+
if [ -n "$(find $S2I_JLINK_TEMP_PATH -maxdepth 0 -type d ! -empty 2> /dev/null)" ]; then
65+
log_info "Cleaning up temporary file directory $S2I_JLINK_TEMP_PATH"
66+
rm -rf $S2I_JLINK_TEMP_PATH
6767
fi
6868
fi

0 commit comments

Comments
 (0)