Skip to content

Commit

Permalink
main: warn empty "LANG" [originally: main: support an option "--input…
Browse files Browse the repository at this point in the history
…rc={diff,all,user,none}"]
  • Loading branch information
akinomyoga committed Feb 19, 2023
1 parent 5812f2e commit 3f29bee
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ble.pp
Expand Up @@ -213,7 +213,7 @@ function ble/.check-environment {
echo "ble.sh: modified PATH=${PATH::${#PATH}-${#original_path}}:\$PATH" >&2
fi

if [[ ! $USER ]]; then
if [[ ! ${USER-} ]]; then
ble/util/print "ble.sh: Insane environment: \$USER is empty." >&2
if USER=$(id -un 2>/dev/null) && [[ $USER ]]; then
export USER
Expand All @@ -222,7 +222,7 @@ function ble/.check-environment {
fi
_ble_base_env_USER=$USER

if [[ ! $HOSTNAME ]]; then
if [[ ! ${HOSTNAME-} ]]; then
ble/util/print "ble.sh: suspicious environment: \$HOSTNAME is empty."
if HOSTNAME=$(uname -n 2>/dev/null) && [[ $HOSTNAME ]]; then
export HOSTNAME
Expand All @@ -231,6 +231,10 @@ function ble/.check-environment {
fi
_ble_base_env_HOSTNAME=$HOSTNAME

if [[ ! ${LANG-} ]]; then
ble/util/print "ble.sh: suspicious environment: \$LANG is empty." >&2
fi

# 暫定的な ble/bin/$cmd 設定
ble/bin/.default-utility-path "${_ble_init_posix_command_list[@]}"

Expand Down

0 comments on commit 3f29bee

Please sign in to comment.