Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ set -e
# up so it points back to us and go is none the wiser

set -x
rm -rf .gopath
mkdir -p .gopath/src/github.com/github
ln -s "$PWD" .gopath/src/github.com/github/gh-ost
if [ ! -L .gopath/src/github.com/github/gh-ost ]; then
rm -rf .gopath
mkdir -p .gopath/src/github.com/github
ln -s "$PWD" .gopath/src/github.com/github/gh-ost
fi
Comment on lines +14 to +18
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The guard only checks that .gopath/src/github.com/github/gh-ost is a symlink (-L). If the repo is moved/renamed, an existing symlink can become stale (or point at a different checkout) and this block will be skipped, causing script/test/script/go to cd into the wrong/broken location. Consider also verifying the symlink target matches the current repo path (e.g., compare readlink to $PWD and/or ensure the link target exists) and recreate .gopath when it doesn't.

Copilot uses AI. Check for mistakes.
export GOPATH=$PWD/.gopath:$GOPATH
Loading