Skip to content

Commit 6826f91

Browse files
Wes Turnerwesturner
authored andcommitted
BUG: 08-bashrc.conda.sh: make echo_conda_envs_paths() (lsce, wec<TAB>): error when CONDA_ENVS_PATH is unset
1 parent e11d25b commit 6826f91

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

etc/bash/08-bashrc.conda.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ function echo_conda_envs_paths {
172172
"${CONDA_ENVS__py36}"
173173
"${CONDA_ENVS__py37}"
174174
)
175+
if [ "$(echo "${envs_paths[*]}" | sed 's/ //g')" == "" ]; then
176+
echo ''>&2
177+
echo 'Error: ${CONDA_ENVS_PATH} is not set'>&2
178+
return 1
179+
fi
175180
printf '%s\n' "${envs_paths[@]}" \
176181
| deduplicate_lines
177182
}

0 commit comments

Comments
 (0)