[FL-3294] Fix TERMINFO on Linux systems (#2630)

* Fix TERMINFO on Linux systems
* Set TERMINFO_DIRS only on Linux
* Unset TERMINFO_DIRS if it was not set before
This commit is contained in:
Georgii Surkov 2023-05-03 00:56:25 +03:00 committed by GitHub
parent e42aec68c5
commit 238005890e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,6 +56,16 @@ fbtenv_restore_env()
unset SSL_CERT_FILE;
unset REQUESTS_CA_BUNDLE;
fi
if [ "$SYS_TYPE" = "Linux" ]; then
if [ -n "$SAVED_TERMINFO_DIRS" ]; then
export TERMINFO_DIRS="$SAVED_TERMINFO_DIRS";
else
unset TERMINFO_DIRS;
fi
unset SAVED_TERMINFO_DIRS;
fi
export PYTHONNOUSERSITE="$SAVED_PYTHONNOUSERSITE";
export PYTHONPATH="$SAVED_PYTHONPATH";
export PYTHONHOME="$SAVED_PYTHONHOME";
@ -325,6 +335,11 @@ fbtenv_main()
export PYTHONNOUSERSITE=1;
export PYTHONPATH=;
export PYTHONHOME=;
if [ "$SYS_TYPE" = "Linux" ]; then
export SAVED_TERMINFO_DIRS="${TERMINFO_DIRS:-""}";
export TERMINFO_DIRS="$TOOLCHAIN_ARCH_DIR/ncurses/share/terminfo";
fi
}
fbtenv_main "${1:-""}";