Skip to content

Commit

Permalink
undo attempted go install fix, more go debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-mm committed Sep 28, 2023
1 parent 11bc700 commit b71aee4
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,9 @@ function initialize {
if [[ $install_go == true ]]; then
echo "GO ENV:"
go env
echo "GO111MODULE Before: $GO111MODULE"
# Save the original value of GO111MODULE (if it was set)
original_go111module="${GO111MODULE:-}"

# Temporarily unset GO111MODULE to avoid module checks
unset GO111MODULE

if go install github.com/guptarohit/asciigraph/cmd/asciigraph@latest 2>/dev/null; then
ascii_graph_path=$(go list -f '{{.Target}}' github.com/guptarohit/asciigraph/cmd/asciigraph)
echo "ascii_graph_path: $ascii_graph_path"
else
echo "Failed to install asciigraph. Continuing without it."
fi

# Restore GO111MODULE to its original value (if it was set)
export GO111MODULE="$original_go111module"
echo "GO111MODULE After: $GO111MODULE"
go version
go install github.com/guptarohit/asciigraph/cmd/asciigraph@latest 2>/dev/null
ascii_graph_path=$(go list -f '{{.Target}}' github.com/guptarohit/asciigraph/cmd/asciigraph)
fi

# check for gcc
Expand Down

0 comments on commit b71aee4

Please sign in to comment.