File tree Expand file tree Collapse file tree 4 files changed +30
-6
lines changed Expand file tree Collapse file tree 4 files changed +30
-6
lines changed Original file line number Diff line number Diff line change @@ -605,7 +605,13 @@ STATUS=0
605605mkdir -p " ${PYENV_VIRTUALENV_CACHE_PATH} "
606606cd " ${PYENV_VIRTUALENV_CACHE_PATH} "
607607if [ -n " ${USE_CONDA} " ]; then
608- pyenv-exec conda create $QUIET $VERBOSE --name " ${VIRTUALENV_PATH##*/ } " --yes " ${VIRTUALENV_OPTIONS[@]} " --file <( pyenv-exec conda list python --full-name --export) || STATUS=" $? "
608+ if [ -z " $VIRTUALENV_PYTHON " ]; then
609+ # process substitution doesn't seem to work unless it's directly inserted to the command line
610+ # if we add it to VIRTUALENV_OPTIONS instead, "broken pipe" happens
611+ pyenv-exec conda create $QUIET $VERBOSE --name " ${VIRTUALENV_PATH##*/ } " --yes " ${VIRTUALENV_OPTIONS[@]} " --file <( pyenv-exec conda list python --full-name --export) || STATUS=" $? "
612+ else
613+ pyenv-exec conda create $QUIET $VERBOSE --name " ${VIRTUALENV_PATH##*/ } " --yes " ${VIRTUALENV_OPTIONS[@]} " || STATUS=" $? "
614+ fi
609615else
610616 if [ -n " ${USE_M_VENV} " ]; then
611617 pyenv-exec " ${M_VENV_PYTHON_BIN:- python} " -m venv $QUIET $VERBOSE " ${VIRTUALENV_OPTIONS[@]} " " ${VIRTUALENV_PATH} " || STATUS=" $? "
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ unstub_pyenv() {
3232 run pyenv-virtualenv venv
3333
3434 assert_success
35- assert_output << OUT
36- PYENV_VERSION=miniconda3-3.16.0 conda create --name venv --yes python
35+ assert_output_wildcards << OUT
36+ PYENV_VERSION=miniconda3-3.16.0 conda create --name venv --yes --file /dev/fd/*
3737rehashed
3838OUT
3939
5656
5757 assert_success
5858 assert_output << OUT
59- PYENV_VERSION=miniconda3-3.16.0 conda create --name venv --yes python=3.5 python
59+ PYENV_VERSION=miniconda3-3.16.0 conda create --name venv --yes python=3.5
6060rehashed
6161OUT
6262
7979
8080 assert_success
8181 assert_output << OUT
82- PYENV_VERSION=miniconda3-3.16.0 conda create --name venv --yes python=3.5 python
82+ PYENV_VERSION=miniconda3-3.16.0 conda create --name venv --yes python=3.5
8383rehashed
8484OUT
8585
Original file line number Diff line number Diff line change 1- #! /usr/bin/env bats
1+ #! /usr/bin/env bats
22
33load test_helper
44
Original file line number Diff line number Diff line change @@ -83,6 +83,16 @@ assert_equal() {
8383 fi
8484}
8585
86+ assert_equal_wildcards () {
87+ if [[ $1 != $2 ]]; then
88+ { echo " expected:"
89+ echo " $2 "
90+ echo " actual:"
91+ echo " $1 "
92+ } | flunk
93+ fi
94+ }
95+
8696assert_output () {
8797 local expected
8898 if [ $# -eq 0 ]; then expected=" $( cat -) "
@@ -91,6 +101,14 @@ assert_output() {
91101 assert_equal " $expected " " $output "
92102}
93103
104+ assert_output_wildcards () {
105+ local expected
106+ if [ $# -eq 0 ]; then expected=" $( cat -) "
107+ else expected=" $1 "
108+ fi
109+ assert_equal_wildcards " $output " " $expected "
110+ }
111+
94112assert_output_contains () {
95113 local expected=" $1 "
96114 echo " $output " | grep -F " $expected " > /dev/null || {
You can’t perform that action at this time.
0 commit comments