nextcloud / vm

💻☁📦 The Nextcloud VM (virtual machine appliance), Home/SME Server and scripts for RPi (4). Community developed and maintained.
https://download.nextcloudvm.com
GNU General Public License v3.0
1.31k stars 661 forks source link

Fix Shellcheck warning #1707

Closed enoch85 closed 3 years ago

enoch85 commented 3 years ago

Check warning on line 1228 in lib.sh GitHub Actions / Shellcheck testing

lib.sh#L1228

[shellcheck] reported by reviewdog 🐶 Don't use variables in the printf format string. Use printf '..%s..' "$foo". SC2059

Raw Output: ./lib.sh:1228:16:info:Don't use variables in the printf format string. Use printf '..%s..' "$foo". SC2059

szaimen commented 3 years ago

Is this still a thing?

enoch85 commented 3 years ago

Yes I think so. Just didn't have the time.

enoch85 commented 3 years ago

It's the spinner loading function:

spinner_loading() {
    pid=$!
    spin='-\|/'
    i=0
    while kill -0 $pid 2>/dev/null
    do
        i=$(( (i+1) %4 ))
>>>>>>>>        printf "\r[${spin:$i:1}] " # Add text here, something like "Please be patient..." maybe?
        sleep .1
    done
}