Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ pkgsets/
archive/
environments/
tmp/
logs/
*.log
scripts/gvm
Gemfile.lock
Expand Down
4 changes: 2 additions & 2 deletions scripts/gvm-check
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ command -v git &> /dev/null ||
error_message="${error_message}
Could not find git

linux: apt-get install mercurial
mac: brew install mercurial
linux: apt-get install git
mac: brew install git
"
# Check for ar
command -v ar &> /dev/null ||
Expand Down
13 changes: 9 additions & 4 deletions scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,14 @@ update_source() {
display_fatal "Couldn't get latest Go version info. Check the logs $GVM_ROOT/logs/go-download.log")
}

copy_source() {
git clone -b "$version" "$GO_CACHE_PATH" "$GO_INSTALL_ROOT" >> "$GVM_ROOT/logs/go-$GO_NAME-install.log" 2>&1 ||
display_fatal "Couldn't copy source to target folder. Check the logs $GVM_ROOT/logs/go-$GO_NAME-install.log"
create_worktree() {
# $GO_CACHE_PATH – shared repository (created by download_source)
# $GO_INSTALL_ROOT – target directory under $GVM_ROOT/gos/<name>
# $version – exact tag matching the requested version
# Create the worktree and log any problem.
git -C "$GO_CACHE_PATH" worktree add "$GO_INSTALL_ROOT" "$version" \
>> "$GVM_ROOT/logs/go-${GO_NAME}-worktree.log" 2>&1 \
|| display_fatal "Failed to create worktree for $version. See $GVM_ROOT/logs/go-${GO_NAME}-worktree.log"
}


Expand Down Expand Up @@ -153,7 +158,7 @@ install_go() {
fi

create_global_package_set
copy_source
create_worktree
compile_go
create_enviroment

Expand Down