Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Commit cb132de

Browse files
authored
fix: remove duplicated go import path code (#545)
* fix: don't remove siblings of the go import path we're adding * fix: remove duplicated code * fix: ensure the parent directory exists before symlinking
1 parent 99d5def commit cb132de

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

run-build-functions.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -687,14 +687,6 @@ install_dependencies() {
687687
restore_cwd_cache "target" "rust compile output"
688688
source $HOME/.cargo/env
689689
fi
690-
691-
# Setup project GOPATH
692-
if [ -n "$GO_IMPORT_PATH" ]
693-
then
694-
mkdir -p "$(dirname $GOPATH/src/$GO_IMPORT_PATH)"
695-
rm -rf $GOPATH/src/$GO_IMPORT_PATH
696-
ln -s /opt/buildhome/repo ${GOPATH}/src/$GO_IMPORT_PATH
697-
fi
698690
}
699691

700692
#
@@ -890,7 +882,7 @@ set_go_import_path() {
890882
local importPath="$GOPATH/src/$GO_IMPORT_PATH"
891883
local dirPath="$(dirname $importPath)"
892884

893-
rm -rf $dirPath
885+
rm -rf $importPath
894886
mkdir -p $dirPath
895887
ln -s $PWD $importPath
896888

0 commit comments

Comments
 (0)