-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix shellcheck warnings for assets/runtime/functions file #291
Labels
Comments
@jcormier please check branch: issue_291 and post result thanks |
Made some comments on the commits. I'll make a pass at it. Remaining warnings $ shellcheck assets/runtime/functions
In assets/runtime/functions line 3:
source ${REDMINE_RUNTIME_DIR}/env-defaults
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 20:
local fs=$(echo @|tr @ '\034')
^-- SC2155: Declare and assign separately to avoid masking return values.
In assets/runtime/functions line 22:
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 |
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 29:
printf("%s%s%s=\"%s\"\n", "'$prefix'",vn, $2, $3);
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 69:
cp ${SYSCONF_TEMPLATES_DIR}/"${SRC}" "${DEST}"
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 84:
local VARIABLES="($@)"
^-- SC2124: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.
In assets/runtime/functions line 85:
local USR="$(stat -c %U ${FILE})"
^-- SC2155: Declare and assign separately to avoid masking return values.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 86:
local tmp_file="$(mktemp)"
^-- SC2155: Declare and assign separately to avoid masking return values.
In assets/runtime/functions line 97:
export ${VARIABLES[@]}
^-- SC2068: Double quote array expansions, otherwise they're like $* and break on spaces.
In assets/runtime/functions line 98:
local IFS=":"; sudo -HEu ${USR} envsubst "${VARIABLES[*]/#/$}" < "${tmp_file}" > ${FILE}
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2024: sudo doesn't affect redirects. Use sudo cat file | ..
^-- SC2024: sudo doesn't affect redirects. Use ..| sudo tee file
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 200:
timeout=$(expr $timeout - 1)
^-- SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]].
In assets/runtime/functions line 218:
update_template ${REDMINE_DATABASE_CONFIG} \
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 229:
exec_as_redmine sed -i "/reconnect: /d" ${REDMINE_DATABASE_CONFIG}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 253:
install_template "${REDMINE_USER}": redmine/additional_environment.rb ${REDMINE_MEMCACHED_CONFIG} 0644
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 254:
update_template ${REDMINE_MEMCACHED_CONFIG} \
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 263:
exec_as_redmine sed -i '/{{REDMINE_RELATIVE_URL_ROOT}}/d' ${REDMINE_UNICORN_CONFIG}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 268:
exec_as_redmine sed -i "s|127.0.0.1:8080|0.0.0.0:8080|" ${REDMINE_UNICORN_CONFIG}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 271:
update_template ${REDMINE_UNICORN_CONFIG} \
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 287:
REDMINE_SECRET_TOKEN=$(< /dev/urandom tr -dc [:alnum:] | head -c64)
^-- SC2060: Quote parameters to tr to prevent glob expansion.
In assets/runtime/functions line 289:
update_template ${REDMINE_SECRET_CONFIG} REDMINE_SECRET_TOKEN
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 294:
update_template ${REDMINE_CONFIG} REDMINE_CONCURRENT_UPLOADS
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 299:
update_template ${REDMINE_CONFIG} \
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 306:
update_template ${REDMINE_CONFIG} \
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 327:
${REDMINE_CONFIG}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 335:
${REDMINE_CONFIG}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 338:
exec_as_redmine sed -i '/{{SMTP_PASS}}/d' ${REDMINE_CONFIG}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 343:
exec_as_redmine sed -i '/{{SMTP_AUTHENTICATION}}/d' ${REDMINE_CONFIG}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 347:
exec_as_redmine sed -i '/{{SMTP_OPENSSL_VERIFY_MODE}}/d' ${REDMINE_CONFIG}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 350:
update_template ${REDMINE_CONFIG} \
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 364:
update_template ${REDMINE_CONFIG} SMTP_CA_PATH
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 367:
update_template ${REDMINE_CONFIG} SMTP_CA_FILE
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 373:
${REDMINE_CONFIG}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 446:
day_of_month=*
^-- SC2125: Brace expansions and globs are literal in assignments. Quote it or use an array.
In assets/runtime/functions line 447:
month=*
^-- SC2125: Brace expansions and globs are literal in assignments. Quote it or use an array.
In assets/runtime/functions line 448:
day_of_week=*
^-- SC2125: Brace expansions and globs are literal in assignments. Quote it or use an array.
In assets/runtime/functions line 472:
eval $(parse_yaml ${REDMINE_CONFIG} config_)
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 473:
eval $(parse_yaml ${REDMINE_DATABASE_CONFIG} database_)
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 474:
case ${database_production_adapter} in
^-- SC2154: database_production_adapter is referenced but not assigned.
In assets/runtime/functions line 476:
echo "Dumping PostgreSQL database ${database_production_database}..."
^-- SC2154: database_production_database is referenced but not assigned.
In assets/runtime/functions line 477:
PGPASSWORD=${database_production_password} pg_dump --clean \
^-- SC2154: database_production_password is referenced but not assigned.
In assets/runtime/functions line 478:
--host ${database_production_host} --port ${database_production_port} \
^-- SC2154: database_production_host is referenced but not assigned.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2154: database_production_port is referenced but not assigned.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 479:
--username ${database_production_username} \
^-- SC2154: database_production_username is referenced but not assigned.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 480:
${database_production_database} > ${config_default_backup_storage_path}/database.sql
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2154: config_default_backup_storage_path is referenced but not assigned.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 485:
--host ${database_production_host} --port ${database_production_port} \
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 486:
--user ${database_production_username} --default-character-set ${database_production_encoding} \
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2154: database_production_encoding is referenced but not assigned.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 487:
${database_production_database} > ${config_default_backup_storage_path}/database.sql
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 490:
chown "${REDMINE_USER}": ${config_default_backup_storage_path}/database.sql
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 491:
exec_as_redmine gzip -f ${config_default_backup_storage_path}/database.sql
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 495:
eval $(parse_yaml ${REDMINE_CONFIG} config_)
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 498:
local dirname=$(basename ${directory})
^-- SC2155: Declare and assign separately to avoid masking return values.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 502:
exec_as_redmine tar -cf ${config_default_backup_storage_path}/${dirname}${extension} -C ${directory} .
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 506:
eval $(parse_yaml ${REDMINE_CONFIG} config_)
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 507:
eval $(parse_yaml ${REDMINE_DATABASE_CONFIG} database_)
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 513:
) > ${config_default_backup_storage_path}/backup_information.yml
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 514:
chown "${REDMINE_USER}": ${config_default_backup_storage_path}/backup_information.yml
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 518:
local tar_file="$(date +%s)_redmine_backup.tar"
^-- SC2155: Declare and assign separately to avoid masking return values.
In assets/runtime/functions line 519:
eval $(parse_yaml ${REDMINE_CONFIG} config_)
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 522:
exec_as_redmine tar -cf ${config_default_backup_storage_path}/${tar_file} -C ${config_default_backup_storage_path} $@
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2068: Double quote array expansions, otherwise they're like $* and break on spaces.
In assets/runtime/functions line 523:
exec_as_redmine chmod 0644 ${config_default_backup_storage_path}/${tar_file}
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 525:
for f in $@
^-- SC2068: Double quote array expansions, otherwise they're like $* and break on spaces.
In assets/runtime/functions line 527:
exec_as_redmine rm -rf ${config_default_backup_storage_path}/${f}
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 532:
eval $(parse_yaml ${REDMINE_CONFIG} config_)
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 533:
if [[ ${config_default_backup_expiry} -gt 0 ]]; then
^-- SC2154: config_default_backup_expiry is referenced but not assigned.
In assets/runtime/functions line 536:
local now=$(date +%s)
^-- SC2155: Declare and assign separately to avoid masking return values.
In assets/runtime/functions line 537:
local cutoff=$(expr ${now} - ${config_default_backup_expiry})
^-- SC2155: Declare and assign separately to avoid masking return values.
^-- SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]].
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 538:
for backup in $(ls ${config_default_backup_storage_path}/*_redmine_backup.tar)
^-- SC2045: Iterating over ls output is fragile. Use globs.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 540:
local timestamp=$(stat -c %Y ${backup})
^-- SC2155: Declare and assign separately to avoid masking return values.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 542:
rm ${backup}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 543:
removed=$(expr ${removed} + 1)
^-- SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]].
In assets/runtime/functions line 553:
eval $(parse_yaml ${REDMINE_CONFIG} config_)
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 554:
tar -xf ${config_default_backup_storage_path}/${backup} -C ${config_default_backup_storage_path}
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 558:
eval $(parse_yaml ${REDMINE_CONFIG} config_)
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 559:
eval $(parse_yaml ${REDMINE_DATABASE_CONFIG} database_)
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 560:
eval $(parse_yaml ${config_default_backup_storage_path}/backup_information.yml backup_)
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 563:
if [[ $(vercmp ${REDMINE_VERSION} ${backup_info_redmine_version}) -lt 0 ]]; then
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2154: backup_info_redmine_version is referenced but not assigned.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 575:
if [[ ${database_production_adapter} != ${backup_info_database_adapter} ]]; then
^-- SC2154: backup_info_database_adapter is referenced but not assigned.
In assets/runtime/functions line 584:
exec_as_redmine rm -rf ${config_default_backup_storage_path}/backup_information.yml
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 588:
eval $(parse_yaml ${REDMINE_CONFIG} config_)
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 589:
eval $(parse_yaml ${REDMINE_DATABASE_CONFIG} database_)
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 593:
gzip -dc ${config_default_backup_storage_path}/database.sql.gz | \
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 595:
--host ${database_production_host} --port ${database_production_port} \
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 596:
--username ${database_production_username} \
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 597:
${database_production_database}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 601:
gzip -dc ${config_default_backup_storage_path}/database.sql.gz | \
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 603:
--host ${database_production_host} --port ${database_production_port} \
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 604:
--user ${database_production_username} --default-character-set ${database_production_encoding} \
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 605:
${database_production_database}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 612:
exec_as_redmine rm -rf ${config_default_backup_storage_path}/database.sql.gz
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 616:
eval $(parse_yaml ${REDMINE_CONFIG} config_)
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 619:
local dirname=$(basename ${directory})
^-- SC2155: Declare and assign separately to avoid masking return values.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 623:
files=($(shopt -s nullglob;shopt -s dotglob;echo ${directory}/*))
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 625:
exec_as_redmine mv ${directory} ${directory}.$(date +%s)
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2046: Quote this to prevent word splitting.
In assets/runtime/functions line 627:
exec_as_redmine rm -rf ${directory}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 629:
exec_as_redmine mkdir -p ${directory}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 630:
exec_as_redmine tar -xf ${config_default_backup_storage_path}/${dirname}${extension} -C ${directory}
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 631:
exec_as_redmine rm -rf ${config_default_backup_storage_path}/${dirname}${extension}
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 646:
echo "Mapping UID and GID for "${REDMINE_USER}":${REDMINE_USER} to $USERMAP_UID:$USERMAP_GID"
^-- SC2027: The surrounding quotes actually unquote this. Remove or escape them.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 647:
groupmod -g ${USERMAP_GID} "${REDMINE_USER}"
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 649:
find ${REDMINE_HOME} -path ${REDMINE_DATA_DIR}/\* -prune -o -print0 | xargs -0 chown -h "${REDMINE_USER}":
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 655:
mkdir -p ${REDMINE_LOG_DIR}/supervisor
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 656:
chmod -R u+rw,go+r ${REDMINE_LOG_DIR}/supervisor
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 657:
chown -R root: ${REDMINE_LOG_DIR}/supervisor
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 659:
mkdir -p ${REDMINE_LOG_DIR}/nginx
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 660:
chmod -R u+rw,go+r ${REDMINE_LOG_DIR}/nginx
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 661:
chown -R "${REDMINE_USER}": ${REDMINE_LOG_DIR}/nginx
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 663:
mkdir -p ${REDMINE_LOG_DIR}/redmine
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 664:
chmod -R u+rw,go+r ${REDMINE_LOG_DIR}/redmine
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 665:
chown -R "${REDMINE_USER}": ${REDMINE_LOG_DIR}/redmine
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 670:
chmod -R u+rw,go+r ${REDMINE_DATA_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 671:
chown -R "${REDMINE_USER}": ${REDMINE_DATA_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 674:
mkdir -p ${REDMINE_PLUGINS_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 675:
chmod -R u+rw,go+r ${REDMINE_PLUGINS_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 676:
chown -R "${REDMINE_USER}": ${REDMINE_PLUGINS_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 679:
mkdir -p ${REDMINE_THEMES_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 680:
chmod -R u+rw,go+r ${REDMINE_THEMES_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 681:
chown -R "${REDMINE_USER}": ${REDMINE_THEMES_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 684:
mkdir -p ${REDMINE_ATTACHMENTS_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 685:
chmod -R u+rw,go+r ${REDMINE_ATTACHMENTS_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 686:
chown -R "${REDMINE_USER}": ${REDMINE_ATTACHMENTS_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 689:
mkdir -p ${REDMINE_BACKUPS_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 690:
chmod -R u+rw,go+r ${REDMINE_BACKUPS_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 691:
chown -R "${REDMINE_USER}": ${REDMINE_BACKUPS_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 714:
mkdir -p ${REDMINE_DATA_DIR}/tmp
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 715:
chmod -R u+rw,go+r ${REDMINE_DATA_DIR}/tmp
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 716:
chown -R "${REDMINE_USER}": ${REDMINE_DATA_DIR}/tmp
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 733:
for dotfile in "$(find ${REDMINE_DOTFILES_DIR} -maxdepth 1 -type d -not -path ${REDMINE_DOTFILES_DIR})"
^-- SC2066: Since you double quoted this, it will not word split, and the loop will only run once.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 735:
exec_as_redmine rm -rf ${REDMINE_HOME}/$(basename ${dotfile})
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 736:
exec_as_redmine ln -sf ${dotfile} ${REDMINE_HOME}/$(basename ${dotfile})
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 743:
install_template "${REDMINE_USER}": redmine/configuration.yml ${REDMINE_CONFIG} 0640
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 744:
install_template "${REDMINE_USER}": redmine/database.yml ${REDMINE_DATABASE_CONFIG} 0640
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 745:
install_template "${REDMINE_USER}": redmine/unicorn.rb ${REDMINE_UNICORN_CONFIG} 0644
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 746:
install_template "${REDMINE_USER}": redmine/secret_token.rb ${REDMINE_SECRET_CONFIG} 0644
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 749:
install_template "${REDMINE_USER}": redmine/config.ru ${REDMINE_INSTALL_DIR}/config.ru 0644
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 777:
update_template ${REDMINE_CONFIG} \
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 795:
exec_as_redmine sed -i "s/:key => '_redmine_session'/:secure => true, :key => '_redmine_session'/" ${REDMINE_INSTALL_DIR}/config/application.rb
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 799:
rm -rf ${REDMINE_INSTALL_DIR}/tmp/sockets/redmine.socket
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 882:
[[ -f ${REDMINE_DATA_DIR}/tmp/VERSION ]] && CACHE_VERSION=$(cat ${REDMINE_DATA_DIR}/tmp/VERSION)
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 885:
if [[ -n ${CACHE_VERSION} && $(vercmp ${REDMINE_VERSION} ${CACHE_VERSION}) -lt 0 ]]; then
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 896:
rm -rf ${REDMINE_DATA_DIR}/tmp
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 897:
exec_as_redmine mkdir -p ${REDMINE_DATA_DIR}/tmp
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 898:
exec_as_redmine mkdir -p ${REDMINE_DATA_DIR}/tmp/thumbnails
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 899:
exec_as_redmine mkdir -p ${REDMINE_DATA_DIR}/tmp/plugin_assets
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 900:
exec_as_redmine chmod -R u+rw,go+r ${REDMINE_DATA_DIR}/tmp
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 911:
echo ${REDMINE_VERSION} | exec_as_redmine tee --append ${REDMINE_DATA_DIR}/tmp/VERSION >/dev/null
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 916:
exec_as_redmine cp -a ${REDMINE_INSTALL_DIR}/vendor/bundle ${REDMINE_DATA_DIR}/tmp/
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 917:
exec_as_redmine cp -a ${REDMINE_INSTALL_DIR}/Gemfile.lock ${REDMINE_DATA_DIR}/tmp/
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 919:
rm -rf ${REDMINE_INSTALL_DIR}/vendor/bundle ${REDMINE_INSTALL_DIR}/Gemfile.lock
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 922:
ln -sf ${REDMINE_DATA_DIR}/tmp/bundle ${REDMINE_INSTALL_DIR}/vendor/bundle
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 923:
ln -sf ${REDMINE_DATA_DIR}/tmp/Gemfile.lock ${REDMINE_INSTALL_DIR}/Gemfile.lock
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 929:
rsync -avq --chown=${REDMINE_USER}:${REDMINE_USER} ${REDMINE_PLUGINS_DIR}/ ${REDMINE_INSTALL_DIR}/plugins/
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 933:
mv ${REDMINE_PLUGINS_DIR}/init ${REDMINE_PLUGINS_DIR}/post-install.sh
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 939:
. ${REDMINE_PLUGINS_DIR}/pre-install.sh
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 944:
[[ -f ${REDMINE_DATA_DIR}/tmp/plugins.sha1 ]] && CURRENT_SHA1=$(cat ${REDMINE_DATA_DIR}/tmp/plugins.sha1)
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 945:
PLUGINS_SHA1=$(find ${REDMINE_PLUGINS_DIR} -type f -print0 | sort -z | xargs -0 sha1sum | sha1sum | awk '{print $1}')
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 949:
rm -rf ${REDMINE_DATA_DIR}/tmp/plugin_assets/*
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 952:
exec_as_redmine bundle install -j$(nproc) --without development test --path ${REDMINE_INSTALL_DIR}/vendor/bundle --quiet
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 958:
echo -n ${PLUGINS_SHA1} > ${REDMINE_DATA_DIR}/tmp/plugins.sha1
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 964:
. ${REDMINE_PLUGINS_DIR}/post-install.sh
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 968:
rm -rf ${REDMINE_DATA_DIR}/tmp/plugins.sha1
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 975:
rsync -avq --chown=${REDMINE_USER}:${REDMINE_USER} ${REDMINE_THEMES_DIR}/ ${REDMINE_INSTALL_DIR}/public/themes/
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 989:
eval "$(parse_yaml ${REDMINE_CONFIG} config_)"
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 991:
backup_dump_directory "${config_default_attachments_storage_path}" .tar
^-- SC2154: config_default_attachments_storage_path is referenced but not assigned.
In assets/runtime/functions line 1001:
eval "$(parse_yaml ${REDMINE_CONFIG} config_)"
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 1016:
num_backups=$(find ${config_default_backup_storage_path}/*_redmine_backup.tar | wc -l)
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 1023:
for b in $(find ${config_default_backup_storage_path}/*_redmine_backup.tar | sort -r)
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 1041:
backup_restore_unpack ${tar_file}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 1044:
backup_restore_directory ${config_default_attachments_storage_path} .tar
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 1046:
backup_restore_directory ${REDMINE_PLUGINS_DIR} .tar.gz
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 1047:
backup_restore_directory ${REDMINE_THEMES_DIR} .tar.gz
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 1050:
rm -rf ${REDMINE_DATA_DIR}/tmp
^-- SC2086: Double quote to prevent globbing and word splitting. |
Pushed another commit for round 3. Plenty of additional. Some of which we will probably ignore. Like the Declare and assign separately ones... $ shellcheck assets/runtime/functions
In assets/runtime/functions line 20:
local fs=$(echo @|tr @ '\034')
^-- SC2155: Declare and assign separately to avoid masking return values.
In assets/runtime/functions line 29:
printf("%s%s%s=\"%s\"\n", "'$prefix'",vn, "$2", "$3");
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 85:
local USR=$(stat -c %U "${FILE}")
^-- SC2155: Declare and assign separately to avoid masking return values.
In assets/runtime/functions line 86:
local tmp_file="$(mktemp)"
^-- SC2155: Declare and assign separately to avoid masking return values.
In assets/runtime/functions line 100:
sudo -HEu "${USR}" envsubst "${VARIABLES[*]/#/$}" < "${tmp_file}" > "${FILE}"
^-- SC2024: sudo doesn't affect redirects. Use sudo cat file | ..
^-- SC2024: sudo doesn't affect redirects. Use ..| sudo tee file
In assets/runtime/functions line 476:
case "${database_production_adapter}" in
^-- SC2154: database_production_adapter is referenced but not assigned.
In assets/runtime/functions line 478:
echo "Dumping PostgreSQL database ${database_production_database}..."
^-- SC2154: database_production_database is referenced but not assigned.
In assets/runtime/functions line 479:
PGPASSWORD="${database_production_password}" pg_dump --clean \
^-- SC2154: database_production_password is referenced but not assigned.
In assets/runtime/functions line 480:
--host "${database_production_host}" --port "${database_production_port}" \
^-- SC2154: database_production_host is referenced but not assigned.
^-- SC2154: database_production_port is referenced but not assigned.
In assets/runtime/functions line 481:
--username "${database_production_username}" \
^-- SC2154: database_production_username is referenced but not assigned.
In assets/runtime/functions line 482:
"${database_production_database}" > "${config_default_backup_storage_path}/database.sql"
^-- SC2154: config_default_backup_storage_path is referenced but not assigned.
In assets/runtime/functions line 488:
--user "${database_production_username}" --default-character-set "${database_production_encoding}" \
^-- SC2154: database_production_encoding is referenced but not assigned.
In assets/runtime/functions line 500:
local dirname=$(basename "${directory}")
^-- SC2155: Declare and assign separately to avoid masking return values.
In assets/runtime/functions line 520:
local tar_file="$(date +%s)_redmine_backup.tar"
^-- SC2155: Declare and assign separately to avoid masking return values.
In assets/runtime/functions line 535:
if [[ "${config_default_backup_expiry}" -gt 0 ]]; then
^-- SC2154: config_default_backup_expiry is referenced but not assigned.
In assets/runtime/functions line 538:
local now=$(date +%s)
^-- SC2155: Declare and assign separately to avoid masking return values.
In assets/runtime/functions line 542:
local timestamp=$(stat -c %Y "${backup}")
^-- SC2155: Declare and assign separately to avoid masking return values.
In assets/runtime/functions line 565:
if [[ $(vercmp "${REDMINE_VERSION}" "${backup_info_redmine_version}") -lt 0 ]]; then
^-- SC2154: backup_info_redmine_version is referenced but not assigned.
In assets/runtime/functions line 577:
if [[ ${database_production_adapter} != ${backup_info_database_adapter} ]]; then
^-- SC2154: backup_info_database_adapter is referenced but not assigned.
In assets/runtime/functions line 621:
local dirname=$(basename "${directory}")
^-- SC2155: Declare and assign separately to avoid masking return values.
In assets/runtime/functions line 657:
mkdir -p ${REDMINE_LOG_DIR}/supervisor
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 658:
chmod -R u+rw,go+r ${REDMINE_LOG_DIR}/supervisor
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 659:
chown -R root: ${REDMINE_LOG_DIR}/supervisor
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 661:
mkdir -p ${REDMINE_LOG_DIR}/nginx
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 662:
chmod -R u+rw,go+r ${REDMINE_LOG_DIR}/nginx
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 663:
chown -R "${REDMINE_USER}": ${REDMINE_LOG_DIR}/nginx
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 665:
mkdir -p ${REDMINE_LOG_DIR}/redmine
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 666:
chmod -R u+rw,go+r ${REDMINE_LOG_DIR}/redmine
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 667:
chown -R "${REDMINE_USER}": ${REDMINE_LOG_DIR}/redmine
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 672:
chmod -R u+rw,go+r ${REDMINE_DATA_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 673:
chown -R "${REDMINE_USER}": ${REDMINE_DATA_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 676:
mkdir -p ${REDMINE_PLUGINS_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 677:
chmod -R u+rw,go+r ${REDMINE_PLUGINS_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 678:
chown -R "${REDMINE_USER}": ${REDMINE_PLUGINS_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 681:
mkdir -p ${REDMINE_THEMES_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 682:
chmod -R u+rw,go+r ${REDMINE_THEMES_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 683:
chown -R "${REDMINE_USER}": ${REDMINE_THEMES_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 686:
mkdir -p ${REDMINE_ATTACHMENTS_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 687:
chmod -R u+rw,go+r ${REDMINE_ATTACHMENTS_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 688:
chown -R "${REDMINE_USER}": ${REDMINE_ATTACHMENTS_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 691:
mkdir -p ${REDMINE_BACKUPS_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 692:
chmod -R u+rw,go+r ${REDMINE_BACKUPS_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 693:
chown -R "${REDMINE_USER}": ${REDMINE_BACKUPS_DIR}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 716:
mkdir -p ${REDMINE_DATA_DIR}/tmp
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 717:
chmod -R u+rw,go+r ${REDMINE_DATA_DIR}/tmp
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 718:
chown -R "${REDMINE_USER}": ${REDMINE_DATA_DIR}/tmp
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 735:
for dotfile in "$(find ${REDMINE_DOTFILES_DIR} -maxdepth 1 -type d -not -path ${REDMINE_DOTFILES_DIR})"
^-- SC2066: Since you double quoted this, it will not word split, and the loop will only run once.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 737:
exec_as_redmine rm -rf ${REDMINE_HOME}/$(basename ${dotfile})
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 738:
exec_as_redmine ln -sf ${dotfile} ${REDMINE_HOME}/$(basename ${dotfile})
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 745:
install_template "${REDMINE_USER}": redmine/configuration.yml ${REDMINE_CONFIG} 0640
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 746:
install_template "${REDMINE_USER}": redmine/database.yml ${REDMINE_DATABASE_CONFIG} 0640
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 747:
install_template "${REDMINE_USER}": redmine/unicorn.rb ${REDMINE_UNICORN_CONFIG} 0644
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 748:
install_template "${REDMINE_USER}": redmine/secret_token.rb ${REDMINE_SECRET_CONFIG} 0644
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 751:
install_template "${REDMINE_USER}": redmine/config.ru ${REDMINE_INSTALL_DIR}/config.ru 0644
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 779:
update_template ${REDMINE_CONFIG} \
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 797:
exec_as_redmine sed -i "s/:key => '_redmine_session'/:secure => true, :key => '_redmine_session'/" ${REDMINE_INSTALL_DIR}/config/application.rb
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 801:
rm -rf ${REDMINE_INSTALL_DIR}/tmp/sockets/redmine.socket
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 884:
[[ -f ${REDMINE_DATA_DIR}/tmp/VERSION ]] && CACHE_VERSION=$(cat ${REDMINE_DATA_DIR}/tmp/VERSION)
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 887:
if [[ -n ${CACHE_VERSION} && $(vercmp ${REDMINE_VERSION} ${CACHE_VERSION}) -lt 0 ]]; then
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 898:
rm -rf ${REDMINE_DATA_DIR}/tmp
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 899:
exec_as_redmine mkdir -p ${REDMINE_DATA_DIR}/tmp
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 900:
exec_as_redmine mkdir -p ${REDMINE_DATA_DIR}/tmp/thumbnails
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 901:
exec_as_redmine mkdir -p ${REDMINE_DATA_DIR}/tmp/plugin_assets
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 902:
exec_as_redmine chmod -R u+rw,go+r ${REDMINE_DATA_DIR}/tmp
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 913:
echo ${REDMINE_VERSION} | exec_as_redmine tee --append ${REDMINE_DATA_DIR}/tmp/VERSION >/dev/null
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 918:
exec_as_redmine cp -a ${REDMINE_INSTALL_DIR}/vendor/bundle ${REDMINE_DATA_DIR}/tmp/
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 919:
exec_as_redmine cp -a ${REDMINE_INSTALL_DIR}/Gemfile.lock ${REDMINE_DATA_DIR}/tmp/
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 921:
rm -rf ${REDMINE_INSTALL_DIR}/vendor/bundle ${REDMINE_INSTALL_DIR}/Gemfile.lock
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 924:
ln -sf ${REDMINE_DATA_DIR}/tmp/bundle ${REDMINE_INSTALL_DIR}/vendor/bundle
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 925:
ln -sf ${REDMINE_DATA_DIR}/tmp/Gemfile.lock ${REDMINE_INSTALL_DIR}/Gemfile.lock
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 931:
rsync -avq --chown=${REDMINE_USER}:${REDMINE_USER} ${REDMINE_PLUGINS_DIR}/ ${REDMINE_INSTALL_DIR}/plugins/
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 935:
mv ${REDMINE_PLUGINS_DIR}/init ${REDMINE_PLUGINS_DIR}/post-install.sh
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 941:
. ${REDMINE_PLUGINS_DIR}/pre-install.sh
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 946:
[[ -f ${REDMINE_DATA_DIR}/tmp/plugins.sha1 ]] && CURRENT_SHA1=$(cat ${REDMINE_DATA_DIR}/tmp/plugins.sha1)
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 947:
PLUGINS_SHA1=$(find ${REDMINE_PLUGINS_DIR} -type f -print0 | sort -z | xargs -0 sha1sum | sha1sum | awk '{print $1}')
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 951:
rm -rf ${REDMINE_DATA_DIR}/tmp/plugin_assets/*
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 954:
exec_as_redmine bundle install -j$(nproc) --without development test --path ${REDMINE_INSTALL_DIR}/vendor/bundle --quiet
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 960:
echo -n ${PLUGINS_SHA1} > ${REDMINE_DATA_DIR}/tmp/plugins.sha1
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 966:
. ${REDMINE_PLUGINS_DIR}/post-install.sh
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 970:
rm -rf ${REDMINE_DATA_DIR}/tmp/plugins.sha1
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 977:
rsync -avq --chown=${REDMINE_USER}:${REDMINE_USER} ${REDMINE_THEMES_DIR}/ ${REDMINE_INSTALL_DIR}/public/themes/
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 991:
eval "$(parse_yaml ${REDMINE_CONFIG} config_)"
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 993:
backup_dump_directory "${config_default_attachments_storage_path}" .tar
^-- SC2154: config_default_attachments_storage_path is referenced but not assigned.
In assets/runtime/functions line 1003:
eval "$(parse_yaml ${REDMINE_CONFIG} config_)"
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 1018:
num_backups=$(find ${config_default_backup_storage_path}/*_redmine_backup.tar | wc -l)
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 1025:
for b in $(find ${config_default_backup_storage_path}/*_redmine_backup.tar | sort -r)
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 1043:
backup_restore_unpack ${tar_file}
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 1046:
backup_restore_directory ${config_default_attachments_storage_path} .tar
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 1048:
backup_restore_directory ${REDMINE_PLUGINS_DIR} .tar.gz
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 1049:
backup_restore_directory ${REDMINE_THEMES_DIR} .tar.gz
^-- SC2086: Double quote to prevent globbing and word splitting.
In assets/runtime/functions line 1052:
rm -rf ${REDMINE_DATA_DIR}/tmp
^-- SC2086: Double quote to prevent globbing and word splitting. |
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Though not every warning may need to be fixed.
The text was updated successfully, but these errors were encountered: