Preserve VS Code settings comments during merge

This commit is contained in:
2026-04-23 16:12:30 -04:00
parent adfcb83ab6
commit 1a2f1510bf
4 changed files with 592 additions and 23 deletions

View File

@@ -45,13 +45,16 @@ find_node_bin() {
link_path() {
local target="$1"
local link_path="$2"
local resolved_target
resolved_target="$(resolve_dir "$target")"
ensure_parent_dir "$link_path"
if [[ -L "$link_path" ]]; then
local existing_target
existing_target="$(cd -- "$(dirname -- "$link_path")" && resolve_dir "$(readlink "$link_path")")"
if [[ "$existing_target" == "$target" ]]; then
if [[ "$existing_target" == "$resolved_target" ]]; then
return 0
fi
printf 'Refusing to replace existing symlink %s -> %s\n' "$link_path" "$existing_target" >&2