Double quote array expansions to avoid re-splitting elements.

If one argument includes spaces, the expansion will be wrong. Add double quotes to avoid that.

https://github.com/koalaman/shellcheck/wiki/SC2068
This commit is contained in:
Bruno Alla 2022-01-04 17:48:21 +00:00
parent a808aca29b
commit 9e44a205c3
2 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@ mkdir -p .cache/bare
cd .cache/bare
# create the project using the default settings in cookiecutter.json
cookiecutter ../../ --no-input --overwrite-if-exists use_docker=n $@
cookiecutter ../../ --no-input --overwrite-if-exists use_docker=n "$@"
cd my_awesome_project
# Install OS deps
@ -42,4 +42,4 @@ then
fi
# Generate the HTML for the documentation
cd docs && make html
cd docs && make html

View File

@ -11,7 +11,7 @@ mkdir -p .cache/docker
cd .cache/docker
# create the project using the default settings in cookiecutter.json
cookiecutter ../../ --no-input --overwrite-if-exists use_docker=y $@
cookiecutter ../../ --no-input --overwrite-if-exists use_docker=y "$@"
cd my_awesome_project
# Lint by running pre-commit on all files
@ -40,4 +40,4 @@ docker-compose -f local.yml run django python manage.py makemessages --all
docker-compose -f local.yml run django python manage.py check --fail-level WARNING
# Generate the HTML for the documentation
docker-compose -f local.yml run docs make html
docker-compose -f local.yml run docs make html