Skip to content

Commit b436595

Browse files
committed
Add error handling for apt-get update and improve environment variable setting
1 parent 0011ba8 commit b436595

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/copilot-setup-steps.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ jobs:
8888
8989
# Update package list again after adding the new repo
9090
echo "Updating package list after adding Microsoft repository..."
91-
sudo apt-get update
91+
if ! sudo apt-get update; then
92+
echo "::warning::apt-get update failed after adding Microsoft repo (repo may be unavailable for this distro). Continuing..."
93+
fi
9294
echo "Microsoft repository added successfully"
9395
echo "::endgroup::"
9496
else
@@ -119,7 +121,7 @@ jobs:
119121
120122
# Set LD_LIBRARY_PATH permanently for the runner session
121123
echo "Setting LD_LIBRARY_PATH environment variable..."
122-
echo "LD_LIBRARY_PATH=/opt/omi/lib:/usr/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH}" >> $GITHUB_ENV
124+
echo "LD_LIBRARY_PATH=/opt/omi/lib:/usr/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH}" >> "$GITHUB_ENV"
123125
echo "Environment variable set successfully"
124126
125127
echo "Linux dependencies installed successfully"

0 commit comments

Comments
 (0)