Skip to content

Commit dd0219a

Browse files
authored
Avoid spurious external link warning by making current_dest a pathlib path
1 parent 93cae4a commit dd0219a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

refresh.template.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1305,7 +1305,7 @@ def _ensure_external_workspaces_link_exists():
13051305
# This seemed to be the cleanest way to detect both.
13061306
# Note that os.path.islink doesn't detect junctions.
13071307
try:
1308-
current_dest = os.readlink(source) # MIN_PY=3.9 source.readlink()
1308+
current_dest = pathlib.Path(os.readlink(source)) # MIN_PY=3.9 source.readlink()
13091309
except OSError:
13101310
log_error(f">>> //external already exists, but it isn't a {'junction' if is_windows else 'symlink'}. //external is reserved by Bazel and needed for this tool. Please rename or delete your existing //external and rerun. More details in the README if you want them.") # Don't auto delete in case the user has something important there.
13111311
sys.exit(1)

0 commit comments

Comments
 (0)