Skip to content

Commit 3669bbf

Browse files
committed
fix(go): always update version symlink on cycle upgrade
The go1.XX symlink (e.g. go1.25 -> go1.25.8) was only created when it didn't exist. On patch upgrades the stale symlink was preserved, so go1.25 still pointed at go1.25.7 after installing go1.25.8, causing the upgrade to appear failed (version unchanged). Change the condition from [ ! -e ] to unconditional ln -sf. Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de> Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
1 parent d4e2302 commit 3669bbf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

scripts/install_go.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ install_go() {
7070
echo "Downloading Go ${FULL_VERSION} SDK..."
7171
"$FULL_BINARY" download || true
7272

73-
# Create symlink from go1.24 -> go1.24.12 for convenience
73+
# Update symlink from go1.24 -> go1.24.12
7474
GOBIN="$(go env GOPATH)/bin"
75-
if [ -x "$GOBIN/$FULL_BINARY" ] && [ ! -e "$GOBIN/$BINARY" ]; then
75+
if [ -x "$GOBIN/$FULL_BINARY" ]; then
7676
ln -sf "$FULL_BINARY" "$GOBIN/$BINARY" 2>/dev/null || true
77-
echo "Created symlink: $BINARY -> $FULL_BINARY"
77+
echo "Updated symlink: $BINARY -> $FULL_BINARY"
7878
fi
7979
fi
8080
else

0 commit comments

Comments
 (0)