Closed schumar closed 1 year ago
That was very careless of me, I'm so sorry. That line should have been confFile=$(printf "%s" "$(<$iniFile)")
. The lack of "%s"
was making it look inside the GShade.ini file for formatting strings -- not an issue until some %'s were added to the 4.0 version of the config file, but it never should've been missing the explicit format string in the first place.
Thankfully this would only have lost someone's Language setting (if it was something other than English in the first place), but that was still a big error on my part. Thank you for the report.
Thanks for the quick fix!
What helps me a lot when writing shell-scripts is ShellCheck (apt install shellcheck
).
It has a lot of common errors it looks out for, e.g. it correctly complained
In gshade_installer.sh line 227:
confFile=$(printf "$(<$iniFile)")
^------------^ SC2059: Don't use variables in the printf format string. Use printf '..%s..' "$foo".
(it also has some false positives, though)
Thank you -- I actually used to use ShellCheck, but it used to kick back so many false positives, I fell out of the habit. I have to push a new commit to fix a bug with opengl games -- not sure if I'll finish that today or not -- after that I'll see about trying to go over the script with shellcheck again.
It seems that line 227
assumes that the content of
$iniFile
is a format-string?