From c273d716e8fbda8ad078c5a6edc52f7020387a2b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 3 Nov 2025 09:58:38 +0000 Subject: [PATCH 1/3] Initial plan From 4f96b6e04d2b9542df0bf91a72b3fface586fe30 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 3 Nov 2025 10:05:13 +0000 Subject: [PATCH 2/3] Fix config.sh and reauth.sh to properly detect missing runtime files - Add file existence checks before running ldd on .NET runtime files - Provide clear error messages when files are missing vs missing dependencies - Remove "No such" from grep pattern as it's now redundant with file checks - This prevents misleading error messages when agent package extraction fails Co-authored-by: raujaiswal <205606577+raujaiswal@users.noreply.github.com> --- src/Misc/layoutroot/config.sh | 29 ++++++++++++++++++++++++++--- src/Misc/layoutroot/reauth.sh | 29 ++++++++++++++++++++++++++--- 2 files changed, 52 insertions(+), 6 deletions(-) diff --git a/src/Misc/layoutroot/config.sh b/src/Misc/layoutroot/config.sh index d65c925ffd..f753f73148 100755 --- a/src/Misc/layoutroot/config.sh +++ b/src/Misc/layoutroot/config.sh @@ -24,21 +24,44 @@ if [[ "$(uname)" == "Linux" ]]; then exit 1 fi - ldd ./bin/libcoreclr.so | grep -E "not found|No such" + # Check if .NET runtime files exist before checking dependencies + if [ ! -f ./bin/libcoreclr.so ]; then + echo "Error: .NET runtime files are missing from ./bin/" + echo "The agent installation appears to be incomplete or corrupted." + echo "Please ensure the agent package was extracted correctly and all files are present." + exit 1 + fi + + if [ ! -f ./bin/libSystem.Security.Cryptography.Native.OpenSsl.so ]; then + echo "Error: .NET runtime files are missing from ./bin/" + echo "The agent installation appears to be incomplete or corrupted." + echo "Please ensure the agent package was extracted correctly and all files are present." + exit 1 + fi + + if [ ! -f ./bin/libSystem.IO.Compression.Native.so ]; then + echo "Error: .NET runtime files are missing from ./bin/" + echo "The agent installation appears to be incomplete or corrupted." + echo "Please ensure the agent package was extracted correctly and all files are present." + exit 1 + fi + + # Check for missing dependencies + ldd ./bin/libcoreclr.so | grep "not found" if [ $? -eq 0 ]; then echo "Dependencies is missing for .NET Core 6.0" echo "Execute ./bin/installdependencies.sh to install any missing dependencies." exit 1 fi - ldd ./bin/libSystem.Security.Cryptography.Native.OpenSsl.so | grep -E "not found|No such" + ldd ./bin/libSystem.Security.Cryptography.Native.OpenSsl.so | grep "not found" if [ $? -eq 0 ]; then echo "Dependencies missing for .NET 6.0" echo "Execute ./bin/installdependencies.sh to install any missing dependencies." exit 1 fi - ldd ./bin/libSystem.IO.Compression.Native.so | grep -E "not found|No such" + ldd ./bin/libSystem.IO.Compression.Native.so | grep "not found" if [ $? -eq 0 ]; then echo "Dependencies missing for .NET 6.0" echo "Execute ./bin/installdependencies.sh to install any missing dependencies." diff --git a/src/Misc/layoutroot/reauth.sh b/src/Misc/layoutroot/reauth.sh index ca68c1182c..a2dc581dc6 100644 --- a/src/Misc/layoutroot/reauth.sh +++ b/src/Misc/layoutroot/reauth.sh @@ -24,21 +24,44 @@ if [[ "$(uname)" == "Linux" ]]; then exit 1 fi - ldd ./bin/libcoreclr.so | grep -E "not found|No such" + # Check if .NET runtime files exist before checking dependencies + if [ ! -f ./bin/libcoreclr.so ]; then + echo "Error: .NET runtime files are missing from ./bin/" + echo "The agent installation appears to be incomplete or corrupted." + echo "Please ensure the agent package was extracted correctly and all files are present." + exit 1 + fi + + if [ ! -f ./bin/libSystem.Security.Cryptography.Native.OpenSsl.so ]; then + echo "Error: .NET runtime files are missing from ./bin/" + echo "The agent installation appears to be incomplete or corrupted." + echo "Please ensure the agent package was extracted correctly and all files are present." + exit 1 + fi + + if [ ! -f ./bin/libSystem.IO.Compression.Native.so ]; then + echo "Error: .NET runtime files are missing from ./bin/" + echo "The agent installation appears to be incomplete or corrupted." + echo "Please ensure the agent package was extracted correctly and all files are present." + exit 1 + fi + + # Check for missing dependencies + ldd ./bin/libcoreclr.so | grep "not found" if [ $? -eq 0 ]; then echo "Dependencies is missing for .NET Core 6.0" echo "Execute ./bin/installdependencies.sh to install any missing dependencies." exit 1 fi - ldd ./bin/libSystem.Security.Cryptography.Native.OpenSsl.so | grep -E "not found|No such" + ldd ./bin/libSystem.Security.Cryptography.Native.OpenSsl.so | grep "not found" if [ $? -eq 0 ]; then echo "Dependencies missing for .NET 6.0" echo "Execute ./bin/installdependencies.sh to install any missing dependencies." exit 1 fi - ldd ./bin/libSystem.IO.Compression.Native.so | grep -E "not found|No such" + ldd ./bin/libSystem.IO.Compression.Native.so | grep "not found" if [ $? -eq 0 ]; then echo "Dependencies missing for .NET 6.0" echo "Execute ./bin/installdependencies.sh to install any missing dependencies." From a2ba677109b8da73db1176c681c30b249cf4d1d9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 3 Nov 2025 10:06:44 +0000 Subject: [PATCH 3/3] Fix grammar: "Dependencies is missing" -> "Dependencies are missing" Co-authored-by: raujaiswal <205606577+raujaiswal@users.noreply.github.com> --- src/Misc/layoutroot/config.sh | 2 +- src/Misc/layoutroot/reauth.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Misc/layoutroot/config.sh b/src/Misc/layoutroot/config.sh index f753f73148..f8b7b9f873 100755 --- a/src/Misc/layoutroot/config.sh +++ b/src/Misc/layoutroot/config.sh @@ -49,7 +49,7 @@ if [[ "$(uname)" == "Linux" ]]; then # Check for missing dependencies ldd ./bin/libcoreclr.so | grep "not found" if [ $? -eq 0 ]; then - echo "Dependencies is missing for .NET Core 6.0" + echo "Dependencies are missing for .NET Core 6.0" echo "Execute ./bin/installdependencies.sh to install any missing dependencies." exit 1 fi diff --git a/src/Misc/layoutroot/reauth.sh b/src/Misc/layoutroot/reauth.sh index a2dc581dc6..aa0c99871d 100644 --- a/src/Misc/layoutroot/reauth.sh +++ b/src/Misc/layoutroot/reauth.sh @@ -49,7 +49,7 @@ if [[ "$(uname)" == "Linux" ]]; then # Check for missing dependencies ldd ./bin/libcoreclr.so | grep "not found" if [ $? -eq 0 ]; then - echo "Dependencies is missing for .NET Core 6.0" + echo "Dependencies are missing for .NET Core 6.0" echo "Execute ./bin/installdependencies.sh to install any missing dependencies." exit 1 fi