readonly ADMIN_INTERFACE_DIR=$(getFTLConfigValue "webserver.paths.webroot")$(getFTLConfigValue "webserver.paths.webhome")
^-----------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
In ./advanced/Scripts/update.sh line 39:
readonly ADMIN_INTERFACE_DIR=$(getFTLConfigValue "webserver.paths.webroot")$(getFTLConfigValue "webserver.paths.webhome")
^-----------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
In ./advanced/Scripts/updatecheck.sh line 45:
readonly ADMIN_INTERFACE_DIR=$(getFTLConfigValue "webserver.paths.webroot")$(getFTLConfigValue "webserver.paths.webhome")
^-----------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
source "${colfile}"
^----------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location.
In ./pihole line 23:
source "${utilsfile}"
^------------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location.
In ./pihole line 27:
source "${apifile}"
^----------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location.
In ./pihole line 34:
source "${versionsfile}"
^---------------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location.
In ./pihole line 251:
local timer="$(echo "${data}"| jq --raw-output '.timer' )"
^---^ SC2155 (warning): Declare and assign separately to avoid masking return values.
In ./pihole line 255:
local str="Pi-hole $(echo "${data}" | jq --raw-output '.blocking')${extra}"
^-^ SC2155 (warning): Declare and assign separately to avoid masking return values.
In ./pihole line 378:
local logging_enabled=$(getFTLConfigValue dns.queryLogging)
^-------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
In ./pihole line 385:
readonly LOGFILE=$(getFTLConfigValue files.log.dnsmasq)
^-----^ SC2155 (warning): Declare and assign separately to avoid masking return values.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
source ${colfile}
^--------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location.
In ./advanced/Scripts/piholeLogFlush.sh line 16:
source "${utilsfile}"
^------------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
corebranches=($(get_available_branches "${PI_HOLE_FILES_DIR}"))
^-- SC2207 (warning): Prefer mapfile or read -a to split command output (or quote to avoid splitting).
In ./advanced/Scripts/piholeCheckout.sh line 139:
webbranches=($(get_available_branches "${webInterfaceDir}"))
^-- SC2207 (warning): Prefer mapfile or read -a to split command output (or quote to avoid splitting).
In ./advanced/Scripts/piholeCheckout.sh line 170:
ftlbranches=( $(git ls-remote https://github.com/pi-hole/ftl | grep "refs/heads" | cut -d'/' -f3- -) )
^-- SC2207 (warning): Prefer mapfile or read -a to split command output (or quote to avoid splitting).
In ./advanced/Scripts/piholeCheckout.sh line 218:
elif [ $? -eq 2 ]; then
^-- SC2319 (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
piholeDir="${2}"
^-------^ SC2034 (warning): piholeDir appears unused. Verify use (or export if used externally).
Turns out it is _actually_ unused, the full path of the gravity database is passed to the function, so we'll tidy this up rather than supressing.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
local status=$(curl --head --silent "https://ftl.pi-hole.net/${1}" | head -n 1)
^----^ SC2155 (warning): Declare and assign separately to avoid masking return values.
In ./automated install/basic-install.sh line 2076:
elif [ $? -eq 2 ]; then
^-- SC2319 (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
also glob with * to ensure .etag & .sha1 are removed as well
should fix#6075
Co-authored-by: yubiuser <github@yubiuser.dev>
Signed-off-by: Michael Woolweaver <michael@woolweaver.bid>