Skip to content
Joachim Ansorg edited this page Nov 12, 2021 · 2 revisions

Couldn't find done for this do.

Problematic code:

yes() {
  while echo "y"
  do
    true
}

Correct code:

yes() {
  while echo "y"
  do
    true
  done
}

Rationale:

ShellCheck found a do without a corresponding done.

Double check that the done exists, and that it correctly matches the indicated do. A companion warning SC1062 is emitted where ShellCheck first noticed it was missing.

Exceptions:

None.

ShellCheck

Each individual ShellCheck warning has its own wiki page like SC1000. Use GitHub Wiki's "Pages" feature guerraart8 to find a specific , or see Checks.

Clone this wiki locally