Skip to content

Commit

Permalink
removed ascii_graph_path line as that was what was causing issues; fi…
Browse files Browse the repository at this point in the history
…xed pythong previous_env logic to work with unbound variables
  • Loading branch information
dan-mm committed Sep 28, 2023
1 parent d1df983 commit 0fdd744
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ function initialize {
# the other solution would be to set the environment variable `go env -w GO111MODULE=auto`... but I can't seem to get any already-set value ahead of time reliably, and do not want to overwrite
# any user environment settings.
# So, we ignore this error for now, as functionally the asciigraph still is installed and works for Eco-CI
go install github.com/guptarohit/asciigraph/cmd/asciigraph@latest || true
ascii_graph_path=$(go list -f '{{.Target}}' github.com/guptarohit/asciigraph/cmd/asciigraph) || true
echo $ascii_graph_path
go install github.com/guptarohit/asciigraph/cmd/asciigraph@latest
fi

# check for gcc
Expand All @@ -46,8 +44,11 @@ function setup_python {
# Create a venv, and backup old
python3 -m venv /tmp/eco-ci/venv

if [[ $VIRTUAL_ENV != '' ]]; then
$PREVIOUS_VENV=$VIRTUAL_ENV
VENV_VALUE=${VIRTUAL_ENV:-}
PREVIOUS_VENV=''

if [[ $VENV_VALUE != '' ]]; then
PREVIOUS_VENV=$VENV_VALUE
source "$(dirname "$0")/vars.sh" add_var PREVIOUS_VENV $PREVIOUS_VENV
fi

Expand Down

0 comments on commit 0fdd744

Please sign in to comment.