Skip to content

Commit c3ee255

Browse files
authored
fix: use 'readlink -e' for venv check (#185)
Closes #184.
1 parent 67d399e commit c3ee255

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • buildpacks/python-dependency-manager/bin

buildpacks/python-dependency-manager/bin/build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ cat >"${execd_dir}"/setup.sh <<EOL
1111
#!/usr/bin/env bash
1212
set -eo pipefail
1313
if [ -d \${RENKU_MOUNT_DIR}/.venv ] && \
14-
([ "\$(readlink \${RENKU_MOUNT_DIR}/.venv/bin/python 2>/dev/null)" != "\$(which python 2>/dev/null)" ] || \
14+
([ "\$(readlink -e \${RENKU_MOUNT_DIR}/.venv/bin/python 2>/dev/null)" != "\$(readlink -e \$(which python 2>/dev/null) 2>/dev/null)" ] || \
1515
[ "\$(grep "version = " \${RENKU_MOUNT_DIR}/.venv/pyvenv.cfg 2>/dev/null | cut -d' ' -f3)" != "\$(python --version 2>/dev/null | cut -d' ' -f2)" ]); then
1616
echo "Virtualenv exists but has mismatch - recreating..."
1717
rm -rf \${RENKU_MOUNT_DIR}/.venv

0 commit comments

Comments
 (0)