Skip to content

Commit d093967

Browse files
committed
change the conda check only and nothing else
1 parent 47d0a46 commit d093967

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

scripts/build-setup.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,14 @@ if run_step "1"; then
166166
# create conda-lock only environment to be used in this section.
167167
# done with cloning base then installing conda lock to speed up dependency solving.
168168
CONDA_LOCK_ENV_PATH=$CYDIR/.conda-lock-env
169+
170+
# check if directories already exist
171+
if [ -d $CONDA_LOCK_ENV_PATH ] || [ -d "$CYDIR/.conda-env" ]; then
172+
echo "Error: Conda environment directories already exist! Delete them before trying to recreate the \
173+
conda environment or \`source env.sh\` and skip this step with \`-s 1\`." >&2
174+
exit 1
175+
fi
176+
169177
rm -rf $CONDA_LOCK_ENV_PATH &&
170178
conda create -y -p $CONDA_LOCK_ENV_PATH -c conda-forge $(grep "conda-lock" $CONDA_REQS/chipyard-base.yaml | sed 's/^ \+-//') &&
171179
source $(conda info --base)/etc/profile.d/conda.sh &&

0 commit comments

Comments
 (0)