Skip to content

Commit fa6041a

Browse files
committed
Stop install process if 'pip install' fails
1 parent a87f9db commit fa6041a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/venv-cli/venv.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ venv::install() {
175175
fi
176176

177177
venv::color_echo "${_green}" "Installing requirements from ${requirements_file}"
178-
pip install --require-virtualenv -r "${requirements_file}" "$@"
178+
if ! pip install --require-virtualenv -r "${requirements_file}" "$@"; then
179+
return 1
180+
fi
179181

180182
local lock_file="${requirements_file/.txt/.lock}" # Replace ".txt" with ".lock"
181183
if "${skip_lock}" || [ "${requirements_file}" = "${lock_file}" ]; then

0 commit comments

Comments
 (0)