File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff 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 &&
You can’t perform that action at this time.
0 commit comments