sameersbn / sameersbn/docker-redmine

Fix shellcheck warnings for assets/runtime/functions file

Open
#291 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Shell
Stars
1.3k
Forks
493
PR merge metrics
No merged PRs in 30d

Description

Though not every warning may need to be fixed.

 $ 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 19:
   local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
                                            ^-- SC2155: Declare and assign separately to avoid masking return values.


In assets/runtime/functions line 21:
        -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 22:
   awk -F$fs '{
         ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 28:
         printf("%s%s%s=\"%s\"\n", "'$prefix'",vn, $2, $3);
                                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 47:
  if [[ $(whoami) == ${REDMINE_USER} ]]; then
                     ^-- SC2053: Quote the rhs of = in [[ ]] to prevent glob interpretation.


In assets/runtime/functions line 48:
    $@
    ^-- SC2068: Double quote array expansions, otherwise they're like $* and break on spaces.


In assets/runtime/functions line 50:
    sudo -HEu ${REDMINE_USER} "$@"
              ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 66:
    cp ${USERCONF_TEMPLATES_DIR}/${SRC} ${DEST}
       ^-- 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 68:
    cp ${SYSCONF_TEMPLATES_DIR}/${SRC} ${DEST}
       ^-- 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 70:
  chmod ${MODE} ${DEST}
        ^-- SC2086: Double quote to prevent globbing and word splitting.
                ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 71:
  chown ${OWNERSHIP} ${DEST}
        ^-- SC2086: Double quote to prevent globbing and word splitting.
                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 84:
  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 85:
  local tmp_file=$(mktemp)
        ^-- SC2155: Declare and assign separately to avoid masking return values.


In assets/runtime/functions line 86:
  cp -a "${FILE}" ${tmp_file}
                  ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 89:
  for variable in ${VARIABLES[@]}; do
                  ^-- SC2068: Double quote array expansions, otherwise they're like $* and break on spaces.


In assets/runtime/functions line 91:
    sed -ri "s/[{]{2}$variable[}]{2}/\${$variable}/g" ${tmp_file}
                                                      ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 96:
    export ${VARIABLES[@]}
           ^-- SC2068: Double quote array expansions, otherwise they're like $* and break on spaces.


In assets/runtime/functions line 97:
    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 | ..
                                                                     ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                                                 ^-- SC2024: sudo doesn't affect redirects. Use ..| sudo tee file
                                                                                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 99:
  rm -f ${tmp_file}
        ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 199:
    timeout=$(expr $timeout - 1)
              ^-- SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]].


In assets/runtime/functions line 217:
  update_template ${REDMINE_DATABASE_CONFIG} \
                  ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 228:
    exec_as_redmine sed -i "/reconnect: /d" ${REDMINE_DATABASE_CONFIG}
                                            ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 252:
    install_template ${REDMINE_USER}: redmine/additional_environment.rb ${REDMINE_MEMCACHED_CONFIG} 0644
                     ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                                        ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 253:
    update_template ${REDMINE_MEMCACHED_CONFIG} \
                    ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 262:
    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 267:
    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 270:
  update_template ${REDMINE_UNICORN_CONFIG} \
                  ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 286:
    REDMINE_SECRET_TOKEN=$(< /dev/urandom tr -dc [:alnum:] | head -c64)
                                                 ^-- SC2060: Quote parameters to tr to prevent glob expansion.


In assets/runtime/functions line 288:
  update_template ${REDMINE_SECRET_CONFIG} REDMINE_SECRET_TOKEN
                  ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 293:
  update_template ${REDMINE_CONFIG} REDMINE_CONCURRENT_UPLOADS
                  ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 298:
  update_template ${REDMINE_CONFIG} \
                  ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 305:
  update_template ${REDMINE_CONFIG} \
                  ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 326:
      ${REDMINE_CONFIG}
      ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 334:
        ${REDMINE_CONFIG}
        ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 337:
        exec_as_redmine sed -i '/{{SMTP_PASS}}/d' ${REDMINE_CONFIG}
                                                  ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 342:
      exec_as_redmine sed -i '/{{SMTP_AUTHENTICATION}}/d' ${REDMINE_CONFIG}
                                                          ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 346:
      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 349:
    update_template ${REDMINE_CONFIG} \
                    ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 363:
        update_template ${REDMINE_CONFIG} SMTP_CA_PATH
                        ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 366:
        update_template ${REDMINE_CONFIG} SMTP_CA_FILE
                        ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 372:
        ${REDMINE_CONFIG}
        ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 380:
    crontab -u ${REDMINE_USER} -l >/tmp/cron.${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 381:
    if ! grep -q 'redmine:email:receive_imap' /tmp/cron.${REDMINE_USER}; then
                                                        ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 406:
      echo "*/${IMAP_INTERVAL} * * * * cd ${REDMINE_HOME}/redmine && bundle exec rake redmine:email:receive_imap host=${IMAP_HOST} port=${IMAP_PORT} ssl=${IMAP_SSL} starttls=${IMAP_STARTTLS} username=${IMAP_USER} password=${IMAP_PASS} ${INCOMING_EMAIL_OPTIONS} RAILS_ENV=${RAILS_ENV} >> ${REDMINE_LOG_DIR}/redmine/cron_rake.log 2>&1" >>/tmp/cron.${REDMINE_USER}
                                                                                                                                                                                                                                                                                                                                                          ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 408:
    crontab -u ${REDMINE_USER} /tmp/cron.${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 409:
    rm -rf /tmp/cron.${REDMINE_USER}
                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 416:
      crontab -u ${REDMINE_USER} -l >/tmp/cron.${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 417:
      if ! grep -q 'Repository.fetch_changesets' /tmp/cron.${REDMINE_USER}; then
                                                           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 421:
            echo "@${REDMINE_FETCH_COMMITS} cd ${REDMINE_HOME}/redmine && ./script/rails runner \"Repository.fetch_changesets\" -e ${RAILS_ENV} >> ${REDMINE_LOG_DIR}/redmine/cron_rake.log 2>&1" >>/tmp/cron.${REDMINE_USER}
                                                                                                                                                                                                              ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 424:
            echo "@${REDMINE_FETCH_COMMITS} cd ${REDMINE_HOME}/redmine && ./bin/rails runner \"Repository.fetch_changesets\" -e ${RAILS_ENV} >> ${REDMINE_LOG_DIR}/redmine/cron_rake.log 2>&1" >>/tmp/cron.${REDMINE_USER}
                                                                                                                                                                                                           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 431:
        crontab -u ${REDMINE_USER} /tmp/cron.${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 433:
      rm -rf /tmp/cron.${REDMINE_USER}
                       ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 441:
      crontab -u ${REDMINE_USER} -l >/tmp/cron.${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 442:
      if ! grep -q '/usr/bin/redmine-backup-create' /tmp/cron.${REDMINE_USER}; then
                                                              ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 445:
        day_of_month=*
                     ^-- SC2125: Brace expansions and globs are literal in assignments. Quote it or use an array.


In assets/runtime/functions line 446:
        month=*
              ^-- SC2125: Brace expansions and globs are literal in assignments. Quote it or use an array.


In assets/runtime/functions line 447:
        day_of_week=*
                    ^-- SC2125: Brace expansions and globs are literal in assignments. Quote it or use an array.


In assets/runtime/functions line 453:
        echo "$min $hour $day_of_month $month $day_of_week /usr/bin/redmine-backup-create >> ${REDMINE_LOG_DIR}/redmine/backups.log 2>&1" >> /tmp/cron.${REDMINE_USER}
                                                                                                                                                       ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 454:
        crontab -u ${REDMINE_USER} /tmp/cron.${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 456:
      rm -rf /tmp/cron.${REDMINE_USER}
                       ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 463:
  update_template ${REDMINE_CONFIG} \
                  ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 471:
  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 472:
  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 473:
  case ${database_production_adapter} in
       ^-- SC2154: database_production_adapter is referenced but not assigned.


In assets/runtime/functions line 475:
      echo "Dumping PostgreSQL database ${database_production_database}..."
                                        ^-- SC2154: database_production_database is referenced but not assigned.


In assets/runtime/functions line 476:
      PGPASSWORD=${database_production_password} pg_dump --clean \
                 ^-- SC2154: database_production_password is referenced but not assigned.


In assets/runtime/functions line 477:
        --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 478:
        --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 479:
        ${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 484:
        --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 485:
        --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 486:
        ${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 489:
  chown ${REDMINE_USER}: ${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:
  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 494:
  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 497:
  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 501:
  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 505:
  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 506:
  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 512:
  ) > ${config_default_backup_storage_path}/backup_information.yml
      ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 513:
  chown ${REDMINE_USER}: ${config_default_backup_storage_path}/backup_information.yml
        ^-- SC2086: Double quote to prevent globbing and word splitting.
                         ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 517:
  local tar_file="$(date +%s)_redmine_backup.tar"
        ^-- SC2155: Declare and assign separately to avoid masking return values.


In assets/runtime/functions line 518:
  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 521:
  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 522:
  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 524:
  for f in $@
           ^-- SC2068: Double quote array expansions, otherwise they're like $* and break on spaces.


In assets/runtime/functions line 526:
    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 531:
  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 532:
  if [[ ${config_default_backup_expiry} -gt 0 ]]; then
        ^-- SC2154: config_default_backup_expiry is referenced but not assigned.


In assets/runtime/functions line 535:
    local now=$(date +%s)
          ^-- SC2155: Declare and assign separately to avoid masking return values.


In assets/runtime/functions line 536:
    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 537:
    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 539:
      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 541:
        rm ${backup}
           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 542:
        removed=$(expr ${removed} + 1)
                  ^-- SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]].


In assets/runtime/functions line 552:
  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 553:
  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 557:
  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 558:
  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 559:
  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 562:
  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 574:
  if [[ ${database_production_adapter} != ${backup_info_database_adapter} ]]; then
                                          ^-- SC2154: backup_info_database_adapter is referenced but not assigned.


In assets/runtime/functions line 583:
  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 587:
  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 588:
  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 592:
      gzip -dc ${config_default_backup_storage_path}/database.sql.gz | \
               ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 594:
          --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 595:
          --username ${database_production_username} \
                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 596:
          ${database_production_database}
          ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 600:
      gzip -dc ${config_default_backup_storage_path}/database.sql.gz | \
               ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 602:
          --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 603:
          --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 604:
          ${database_production_database}
          ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 611:
  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 615:
  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 618:
  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 622:
  files=($(shopt -s nullglob;shopt -s dotglob;echo ${directory}/*))
                                                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 624:
    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 626:
    exec_as_redmine rm -rf ${directory}
                           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 628:
  exec_as_redmine mkdir -p ${directory}
                           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 629:
  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 630:
  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 640:
  USERMAP_ORIG_UID=$(id -u ${REDMINE_USER})
                           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 641:
  USERMAP_ORIG_GID=$(id -g ${REDMINE_USER})
                           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 646:
    groupmod -g ${USERMAP_GID} ${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 648:
    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.
                                                                                            ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 654:
  mkdir -p ${REDMINE_LOG_DIR}/supervisor
           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 655:
  chmod -R u+rw,go+r ${REDMINE_LOG_DIR}/supervisor
                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 656:
  chown -R root: ${REDMINE_LOG_DIR}/supervisor
                 ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 658:
  mkdir -p ${REDMINE_LOG_DIR}/nginx
           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 659:
  chmod -R u+rw,go+r ${REDMINE_LOG_DIR}/nginx
                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 660:
  chown -R ${REDMINE_USER}: ${REDMINE_LOG_DIR}/nginx
           ^-- SC2086: Double quote to prevent globbing and word splitting.
                            ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 662:
  mkdir -p ${REDMINE_LOG_DIR}/redmine
           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 663:
  chmod -R u+rw,go+r ${REDMINE_LOG_DIR}/redmine
                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 664:
  chown -R ${REDMINE_USER}: ${REDMINE_LOG_DIR}/redmine
           ^-- SC2086: Double quote to prevent globbing and word splitting.
                            ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 669:
  chmod -R u+rw,go+r ${REDMINE_DATA_DIR}
                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 670:
  chown -R ${REDMINE_USER}: ${REDMINE_DATA_DIR}
           ^-- SC2086: Double quote to prevent globbing and word splitting.
                            ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 673:
  mkdir -p ${REDMINE_PLUGINS_DIR}
           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 674:
  chmod -R u+rw,go+r ${REDMINE_PLUGINS_DIR}
                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 675:
  chown -R ${REDMINE_USER}: ${REDMINE_PLUGINS_DIR}
           ^-- SC2086: Double quote to prevent globbing and word splitting.
                            ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 678:
  mkdir -p ${REDMINE_THEMES_DIR}
           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 679:
  chmod -R u+rw,go+r ${REDMINE_THEMES_DIR}
                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 680:
  chown -R ${REDMINE_USER}: ${REDMINE_THEMES_DIR}
           ^-- SC2086: Double quote to prevent globbing and word splitting.
                            ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 683:
  mkdir -p ${REDMINE_ATTACHMENTS_DIR}
           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 684:
  chmod -R u+rw,go+r ${REDMINE_ATTACHMENTS_DIR}
                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 685:
  chown -R ${REDMINE_USER}: ${REDMINE_ATTACHMENTS_DIR}
           ^-- SC2086: Double quote to prevent globbing and word splitting.
                            ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 688:
  mkdir -p ${REDMINE_BACKUPS_DIR}
           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 689:
  chmod -R u+rw,go+r ${REDMINE_BACKUPS_DIR}
                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 690:
  chown -R ${REDMINE_USER}: ${REDMINE_BACKUPS_DIR}
           ^-- SC2086: Double quote to prevent globbing and word splitting.
                            ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 700:
  mkdir -p ${REDMINE_DOTFILES_DIR}
           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 701:
  chmod -R u+rw,go+r ${REDMINE_DOTFILES_DIR}
                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 702:
  chown -R ${REDMINE_USER}: ${REDMINE_DOTFILES_DIR}
           ^-- SC2086: Double quote to prevent globbing and word splitting.
                            ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 704:
  mkdir -p ${REDMINE_DOTFILES_DIR}/.ssh
           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 705:
  chmod -R u+rw,go-rwx ${REDMINE_DOTFILES_DIR}/.ssh
                       ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 706:
  chown -R ${REDMINE_USER}: ${REDMINE_DOTFILES_DIR}/.ssh
           ^-- SC2086: Double quote to prevent globbing and word splitting.
                            ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 708:
  mkdir -p ${REDMINE_DOTFILES_DIR}/.subversion
           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 709:
  chmod -R u+rw,go+r ${REDMINE_DOTFILES_DIR}/.subversion
                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 710:
  chown -R ${REDMINE_USER}: ${REDMINE_DOTFILES_DIR}/.subversion
           ^-- SC2086: Double quote to prevent globbing and word splitting.
                            ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 713:
  mkdir -p ${REDMINE_DATA_DIR}/tmp
           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 714:
  chmod -R u+rw,go+r ${REDMINE_DATA_DIR}/tmp
                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 715:
  chown -R ${REDMINE_USER}: ${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 721:
    exec_as_redmine rm -rf ${REDMINE_DOTFILES_DIR}/.ssh/id_rsa ${REDMINE_DOTFILES_DIR}/.ssh/id_rsa.pub
                           ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                               ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 722:
    exec_as_redmine ssh-keygen -qt rsa -N '' -f ${REDMINE_DOTFILES_DIR}/.ssh/id_rsa
                                                ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 726:
  chmod 0600 ${REDMINE_DOTFILES_DIR}/.ssh/id_rsa ${REDMINE_DOTFILES_DIR}/.ssh/id_rsa.pub
             ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                 ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 727:
  chmod 0700 ${REDMINE_DOTFILES_DIR}/.ssh
             ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 732:
  for dotfile in $(find ${REDMINE_DOTFILES_DIR} -maxdepth 1 -type d -not -path ${REDMINE_DOTFILES_DIR})
                 ^-- SC2044: For loops over find output are fragile. Use find -exec or a while read loop.
                        ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                                               ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 734:
    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 735:
    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 742:
  install_template ${REDMINE_USER}: redmine/configuration.yml ${REDMINE_CONFIG} 0640
                   ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                              ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 743:
  install_template ${REDMINE_USER}: redmine/database.yml ${REDMINE_DATABASE_CONFIG} 0640
                   ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                         ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 744:
  install_template ${REDMINE_USER}: redmine/unicorn.rb ${REDMINE_UNICORN_CONFIG} 0644
                   ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                       ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 745:
  install_template ${REDMINE_USER}: redmine/secret_token.rb ${REDMINE_SECRET_CONFIG} 0644
                   ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                            ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 748:
    install_template ${REDMINE_USER}: redmine/config.ru ${REDMINE_INSTALL_DIR}/config.ru 0644
                     ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                        ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 776:
  update_template ${REDMINE_CONFIG} \
                  ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 794:
    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 798:
  rm -rf ${REDMINE_INSTALL_DIR}/tmp/sockets/redmine.socket
         ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 881:
  [[ -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 884:
    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 895:
    rm -rf ${REDMINE_DATA_DIR}/tmp
           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 896:
    exec_as_redmine mkdir -p ${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/thumbnails
                             ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 898:
    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 899:
    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 910:
    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 915:
    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 916:
    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 918:
  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 921:
  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 922:
  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 928:
    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 932:
      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 938:
      . ${REDMINE_PLUGINS_DIR}/pre-install.sh
        ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 943:
    [[ -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 944:
    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 948:
      rm -rf ${REDMINE_DATA_DIR}/tmp/plugin_assets/*
             ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 951:
      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 957:
      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 963:
      . ${REDMINE_PLUGINS_DIR}/post-install.sh
        ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 967:
    rm -rf ${REDMINE_DATA_DIR}/tmp/plugins.sha1
           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 974:
    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 984:
  exec_as_redmine bundle exec rake $@
                                   ^-- SC2068: Double quote array expansions, otherwise they're like $* and break on spaces.


In assets/runtime/functions line 988:
  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 990:
  backup_dump_directory ${config_default_attachments_storage_path} .tar
                        ^-- SC2154: config_default_attachments_storage_path is referenced but not assigned.
                        ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 991:
  backup_dump_directory ${REDMINE_DOTFILES_DIR} .tar.gz
                        ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 992:
  backup_dump_directory ${REDMINE_PLUGINS_DIR} .tar.gz
                        ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 993:
  backup_dump_directory ${REDMINE_THEMES_DIR} .tar.gz
                        ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 1000:
  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 1004:
  for arg in $@
             ^-- SC2068: Double quote array expansions, otherwise they're like $* and break on spaces.


In assets/runtime/functions line 1015:
    num_backups=$(ls ${config_default_backup_storage_path}/*_redmine_backup.tar | wc -l)
                  ^-- SC2012: Use find instead of ls to better handle non-alphanumeric filenames.
                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 1022:
    for b in $(ls ${config_default_backup_storage_path} | grep _redmine_backup.tar | sort -r)
               ^-- SC2010: Don't use ls | grep. Use a glob or a for loop with a condition to allow non-alphanumeric filenames.
                  ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 1040:
  backup_restore_unpack ${tar_file}
                        ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 1043:
  backup_restore_directory ${config_default_attachments_storage_path} .tar
                           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 1044:
  backup_restore_directory ${REDMINE_DOTFILES_DIR} .tar.gz
                           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 1045:
  backup_restore_directory ${REDMINE_PLUGINS_DIR} .tar.gz
                           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 1046:
  backup_restore_directory ${REDMINE_THEMES_DIR} .tar.gz
                           ^-- SC2086: Double quote to prevent globbing and word splitting.


In assets/runtime/functions line 1049:
  rm -rf ${REDMINE_DATA_DIR}/tmp
         ^-- SC2086: Double quote to prevent globbing and word splitting.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with assets/runtime/functions and run shellcheck assets/runtime/functions to reproduce the listed warnings. Review each warning in context, preserving intentional shell behavior where appropriate; done means the applicable warnings are addressed and the command's remaining output is understood.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
devops
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.