Skip to content

Commit bb62c21

Browse files
committed
Make venv create print full python version used
1 parent f58ea97 commit bb62c21

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/venv-cli/venv.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ venv::create() {
107107
fi
108108

109109
local python_version="$1"
110-
local venv_prompt='.'
111110
local venv_name
112111
venv_name="$(basename "${PWD}")"
113112

114113
# Check if a specific name for the "--prompt" was specified
114+
local venv_prompt='.'
115115
if [ -n "$2" ]; then
116116
venv_prompt="$2"
117117
venv_name="${venv_prompt}"
@@ -124,7 +124,8 @@ venv::create() {
124124
return "$?"
125125
fi
126126

127-
venv::color_echo "${_green}" "Creating virtual environment '${venv_name}' using python${python_version}"
127+
local full_python_version="$(${python_executable} -V)"
128+
venv::color_echo "${_green}" "Creating virtual environment '${venv_name}' using ${full_python_version}"
128129
${python_executable} -m venv .venv --prompt "${venv_prompt}"
129130
}
130131

0 commit comments

Comments
 (0)