Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shellcheck: encountered an exception while trying to report an exception. #2647

Open
kirxkirx opened this issue Dec 27, 2022 · 0 comments
Open

Comments

@kirxkirx
Copy link

shellcheck does not work with a non-standard locale:

kirx@eridan ~/current_work/vast $ shellcheck util/search_databases_with_vizquery.sh
shellcheck: encountered an exception while trying to report an exception.
One possible reason for this is that we failed while trying to encode an error message. Check that your locale is configured properly.
kirx@eridan ~/current_work/vast $ locale
LANG=ru_RU.KOI8-R
LC_CTYPE="ru_RU.KOI8-R"
LC_NUMERIC="ru_RU.KOI8-R"
LC_TIME="ru_RU.KOI8-R"
LC_COLLATE="ru_RU.KOI8-R"
LC_MONETARY="ru_RU.KOI8-R"
LC_MESSAGES="ru_RU.KOI8-R"
LC_PAPER="ru_RU.KOI8-R"
LC_NAME="ru_RU.KOI8-R"
LC_ADDRESS="ru_RU.KOI8-R"
LC_TELEPHONE="ru_RU.KOI8-R"
LC_MEASUREMENT="ru_RU.KOI8-R"
LC_IDENTIFICATION="ru_RU.KOI8-R"
LC_ALL=
kirx@eridan ~/current_work/vast $ shellcheck --version                             
shellcheck: encountered an exception while trying to report an exception.
One possible reason for this is that we failed while trying to encode an error message. Check that your locale is configured properly.
kirx@eridan ~/current_work/vast $ export LANG=C
kirx@eridan ~/current_work/vast $ shellcheck --version
ShellCheck - shell script analysis tool
version: 0.8.0
license: GNU General Public License, version 3
website: https://www.shellcheck.net
kirx@eridan ~/current_work/vast $ 

This is a binary version of shellcheck installed from the Gentoo repository (package name dev-util/shellcheck-bin).

Here's what I wanted or expected to see:

The expected behaviour would be for shellcheck to produce the normal English-language (if the current locale is not supported) terminal output instead of a cryptic English-language error message about "an exception while trying to report an exception".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant