Skip to content

Commit aec17ea

Browse files
committed
fix(bootstrap): report dangling symlinks
A user can create a dangling symlink to a Python bootstrap script. Add an explicit error for dangling symlinks to help users better diagnose.
1 parent b836fe5 commit aec17ea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/private/stage1_bootstrap_template.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ else
104104
stub_filename="${stub_filename%/*}/$stub_filename_target"
105105
fi
106106
unset stub_filename_target
107+
if [[ ! -e "$stub_filename" ]]; then
108+
echo >&2 "Unable to find runfiles directory for $1: dangling symlink: $stub_filename"
109+
exit 1
110+
fi
107111
done
108112
echo >&2 "Unable to find runfiles directory for $1"
109113
exit 1

0 commit comments

Comments
 (0)