From fb6589f23f195115f4b15028f32e03e53b994f4e Mon Sep 17 00:00:00 2001 From: Nuri Jung Date: Tue, 12 Mar 2024 20:49:43 +0900 Subject: [PATCH] fix: silence file not found --- _conda | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/_conda b/_conda index 09bab01..1ae94da 100644 --- a/_conda +++ b/_conda @@ -204,7 +204,7 @@ __conda_envs(){ # unmaned envs (if show-unammed). if test -n "$unnamed"; then - envs+=($( (test -n "$unnamed" && cat ${HOME:?}/.conda/environments.txt) | cut -f1 -d' ' | sed -e "s|^${PWD}|.|" | sed -e "s|^$localenvspath/||")) + envs+=($( (cat ${HOME:?}/.conda/environments.txt) 2>/dev/null | cut -f1 -d' ' | sed -e "s|^${PWD}|.|" | sed -e "s|^$localenvspath/||")) fi _describe $describe_opts -t envs 'conda environments' envs @@ -746,4 +746,3 @@ case $state in esac ;; esac -