Closed OniriCorpe closed 4 months ago
Rough guess but that's probably because you have :
ynh_exec_warn_less "$final_path"/gotosocial [...]
and I would instead write :
ynh_exec_warn_less $final_path/gotosocial [...]
... at least to make the linter happy ... Quoting variables should indeed be recommended, but we end up having to rely to boring greps to check for deprecated practices and those do have a few false-positive situations ... On another angle : I never really understood why we have this ynh_exec_warn_less
helper instead of just using the classic 2>&1
... but I guess the rationale when it was introduced was "2>&1
is super technical and non-tech people don't understand what this means" etc...
Quoting variables should indeed be recommended
This makes shellcheck scream if you don't do it :sweat_smile:
But avoid launching shellcheck on yunohost helps, I tried, it didn't ended up well :<
my line starts with a quote and ends with a quote
boring greps
And you didn't even need to end it with a quote :v
the CI warns me
but i don't have quoted code after a
ynh_exec_*
, my line starts with a quote and ends with a quote, but isn't quoted:ynh_exec_warn_less "$final_path"/gotosocial --config-path "$final_path/config.yaml" admin account promote --username "$admin"
my code is clean, so I shouldn't be warnedthe CI log: https://ci-apps-dev.yunohost.org/ci/job/9491 the warned code: https://github.com/YunoHost-Apps/gotosocial_ynh/commit/15fe5958c20a5de53e5ef7e81527f36612fdaca5