AsahiLinux / asahi-installer

Asahi Linux installer
MIT License
782 stars 104 forks source link

toil: update all shell scripts to pass static analysis with shellcheck SC2048 #314

Closed PaulCharlton closed 3 days ago

PaulCharlton commented 3 days ago

toil: update all shell scripts to pass static analysis with shellcheck SC2048

This will be submitted as multiple related issues, with a PR for each of those as there are 448 issues in the various scripts. In order to bring that down to a reviewable scope, each separate PR is planned as follows:

1) SC1091 (info): Not following: ./.cargo/env was not specified as input (see shellcheck -x). 1) SC2034 (warning): appears unused. Verify use (or export if used externally). 1) SC2046 (warning): Quote this to prevent word splitting. 1) SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems. 1) SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". 1) SC2086 (info): Double quote to prevent globbing and word splitting. 1) SC2153 (info): Possible misspelling: DECDEV may not be assigned. Did you mean SECDEV? 1) SC2162 (info): read without -r will mangle backslashes. 1) SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails. 1) SC2223 (info): This default assignment may cause DoS due to globbing. Quote it.