Skip to content

Commit b0df8b8

Browse files
committed
Change if-statement for zsh compat.
1 parent 4b8c241 commit b0df8b8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/venv-cli/venv.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,13 +259,12 @@ venv::lock() {
259259

260260
elif [[ "$1" = *"."* ]]; then
261261
# If first argument looks like a file name ...
262-
if !(venv::_check_lock_requirements_file "$1" -q); then
262+
if venv::_check_lock_requirements_file "$1" -q; then
263+
# ... and is a lock file
264+
lock_file="$1"
265+
else
263266
venv::raise "Input file(s) had wrong format. See 'venv lock --help' for more info."
264267
return "$?"
265-
266-
# ... and is a lock file
267-
lock_file="$1"
268-
shift
269268
fi
270269

271270
else

0 commit comments

Comments
 (0)