File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,15 @@ if run_step "1"; then
156156 # note: lock file must end in .conda-lock.yml - see https://github.com/conda-incubator/conda-lock/issues/154
157157 CONDA_REQS=$CYDIR /conda-reqs
158158 CONDA_LOCK_REQS=$CONDA_REQS /conda-lock-reqs
159+
160+ # check if directories already exist
161+ if [ -d " $CONDA_REQS " ] || [ -d " $CONDA_LOCK_REQS " ]; then
162+ echo " Error: Directories $CONDA_REQS and/or " $CONDA_LOCK_REQS " already exist! \
163+ Delete them before trying to recreate the conda environment or \` source env.sh\` \
164+ and skip this step with \` -s 1\` ." >&2
165+ exit 1
166+ fi
167+
159168 # must match with the file generated by generate-conda-lockfile.sh
160169 if [ " $USE_LEAN_CONDA " = false ]; then
161170 LOCKFILE=$CONDA_LOCK_REQS /conda-requirements-$TOOLCHAIN_TYPE -linux-64.conda-lock.yml
You can’t perform that action at this time.
0 commit comments