Skip to content

Commit 7bcc5f4

Browse files
authored
add -s alias for --skip-lock (#24)
2 parents 90611ce + 144bff1 commit 7bcc5f4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/venv-cli/venv.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,13 @@ venv::deactivate() {
165165

166166
venv::install() {
167167
if venv::_check_if_help_requested "$1"; then
168-
echo "venv install [<requirements file>] [--skip-lock] [<install args>]"
168+
echo "venv install [<requirements file>] [--skip-lock|-s] [<install args>]"
169169
echo
170170
echo "Clear the environment, then install requirements from <requirements file>,"
171171
echo "like 'requirements.txt' or 'requirements.lock'."
172172
echo "Installed packages are then locked into the corresponding .lock-file,"
173173
echo "e.g. 'venv install requirements.txt' will lock packages into 'requirements.lock'."
174-
echo "This step is skipped if '--skip-lock' is specified, or when installing"
174+
echo "This step is skipped if '--skip-lock' or '-s' is specified, or when installing"
175175
echo "directly from a .lock-file."
176176
echo
177177
echo "The <requirements file> must be in the form '*requirements.[txt|lock]'."
@@ -185,12 +185,12 @@ venv::install() {
185185
echo
186186
echo "$ venv install dev-requirements.txt"
187187
echo
188-
echo "$ venv install requirements.txt --skip-lock --no-cache"
188+
echo "$ venv install requirements.txt --skip-lock|-s --no-cache"
189189
return "${_success}"
190190
fi
191191

192192
local requirements_file
193-
if [ -z "$1" ] || [ "$1" = "--skip-lock" ]; then
193+
if [ -z "$1" ] || [ "$1" = "--skip-lock" ] || [ "$1" = "-s" ]; then
194194
# If no filename was passed
195195
requirements_file="requirements.txt"
196196

@@ -206,7 +206,7 @@ venv::install() {
206206
fi
207207

208208
local skip_lock=false
209-
if [ "$1" = "--skip-lock" ]; then
209+
if [ "$1" = "--skip-lock" ] || [ "$1" = "-s" ]; then
210210
skip_lock=true
211211
shift
212212
fi

0 commit comments

Comments
 (0)