vscode server: cope with multiple libc/libc++ installations (#204032)

cope with multiple libc/libc++ installations
This commit is contained in:
Mahmood Ali 2024-02-02 08:57:59 -05:00 committed by GitHub
parent 933a728d0e
commit 929edab639
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,7 +56,7 @@ elif [ -f /sbin/ldconfig ]; then
libstdcpp_paths=$(/sbin/ldconfig -p | grep 'libstdc++.so.6')
if [ "$(echo "$libstdcpp_paths" | wc -l)" -gt 1 ]; then
libstdcpp_path=$(echo "$libstdcpp_paths" | grep "$LDCONFIG_ARCH" | awk '{print $NF}')
libstdcpp_path=$(echo "$libstdcpp_paths" | grep "$LDCONFIG_ARCH" | awk '{print $NF}' | head -n1)
else
libstdcpp_path=$(echo "$libstdcpp_paths" | awk '{print $NF}')
fi
@ -90,7 +90,7 @@ if [ -z "$(ldd --version 2>&1 | grep 'musl libc')" ]; then
libc_paths=$(/sbin/ldconfig -p | grep 'libc.so.6')
if [ "$(echo "$libc_paths" | wc -l)" -gt 1 ]; then
libc_path=$(echo "$libc_paths" | grep "$LDCONFIG_ARCH" | awk '{print $NF}')
libc_path=$(echo "$libc_paths" | grep "$LDCONFIG_ARCH" | awk '{print $NF}' | head -n1)
else
libc_path=$(echo "$libc_paths" | awk '{print $NF}')
fi