Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5714 from ldoktor/go
Browse files Browse the repository at this point in the history
ci: Initialize GOPATH before it's used
  • Loading branch information
wainersm authored Jul 27, 2023
2 parents 2075a7f + d32ca2d commit 6caf9f4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .ci/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
# SPDX-License-Identifier: Apache-2.0
#

# Ensure GOPATH set
if command -v go > /dev/null; then
export GOPATH=${GOPATH:-$(go env GOPATH)}
else
# if go isn't installed, set default location for GOPATH
export GOPATH="${GOPATH:-$HOME/go}"
fi

export KATA_KSM_THROTTLER=${KATA_KSM_THROTTLER:-no}
export KATA_QEMU_DESTDIR=${KATA_QEMU_DESTDIR:-"/usr"}
export KATA_ETC_CONFIG_PATH="/etc/kata-containers/configuration.toml"
Expand Down Expand Up @@ -33,14 +41,6 @@ export KATA_NET_TIMEOUT=30

source /etc/os-release || source /usr/lib/os-release

# Ensure GOPATH set
if command -v go > /dev/null; then
export GOPATH=${GOPATH:-$(go env GOPATH)}
else
# if go isn't installed, set default location for GOPATH
export GOPATH="${GOPATH:-$HOME/go}"
fi

# Support Golang 1.16.x.
# By default in Golang >= 1.16 GO111MODULE is set to "on",
# some subprojects in this repo may not support "go modules",
Expand Down

0 comments on commit 6caf9f4

Please sign in to comment.