From cb805e0712a8de6884d7a8748302d7ef2fc2ca4c Mon Sep 17 00:00:00 2001 From: Anthony Mendez <738092+0x6d6e647a@users.noreply.github.com> Date: Fri, 1 Dec 2023 20:19:20 -0800 Subject: [PATCH] Rename 'LANG' variable in script/compile to avoid bug. If 'LANG' is set to 'pascal' in script/compile, when `emacs -Q ...` is launcher emacs will exit with the following error: Language environment not defined: "Punjabi" This is because 'LANG' is a locale setting variable so 'pascal' is interpreted as 'pa' which is code for the Punjabi locale. --- script/compile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/compile b/script/compile index 7ee2ec27..c268cb9e 100755 --- a/script/compile +++ b/script/compile @@ -16,7 +16,7 @@ set -euo pipefail here=$(cd "$(dirname "$BASH_SOURCE")"; pwd) PROJECT_ROOT=$(cd "$here/.."; pwd) -LANG=$1 +PROGLANG=$1 # Parse named parameters. POSITIONAL=() @@ -39,7 +39,7 @@ if [ "$target" == "'" ]; then target=nil fi -case $LANG in +case $PROGLANG in (all) code="(tree-sitter-langs-create-bundle nil $target)" ;; @@ -47,7 +47,7 @@ case $LANG in code="(tree-sitter-langs-compile-changed-or-all \"${POSITIONAL[1]:-origin/master}\" $target)" ;; (*) - code="(tree-sitter-langs-compile '$LANG nil $target)" + code="(tree-sitter-langs-compile '$PROGLANG nil ${target})" esac (