diff --git a/lib/functions/compilation/kernel-git-oras.sh b/lib/functions/compilation/kernel-git-oras.sh index 6da0a585e2..2221ab77e6 100644 --- a/lib/functions/compilation/kernel-git-oras.sh +++ b/lib/functions/compilation/kernel-git-oras.sh @@ -155,8 +155,7 @@ function kernel_prepare_bare_repo_decide_shallow_or_full() { display_alert "git_kernel_oras_ref" "${git_kernel_oras_ref}" "git" display_alert "estimated_dl_size_mib" "${estimated_dl_size_mib}" "git" - # if ask_for_user_confirmation -eq 1 and -t 1 - if [[ ${ask_for_user_confirmation} -eq 1 && -t 1 ]]; then + if [[ ${ask_for_user_confirmation} -eq 1 && -t 0 ]]; then # -t 0 means stdin is a terminal echo "--------------------------------------------------------------------------------------------------------------------" >&2 display_alert "Warning: no Kernel bare tree exists for version ${KERNEL_MAJOR_MINOR} - about to start downloading." "" "wrn" display_alert "Armbian is going to use a '${decision}' git tree, which is around" "${estimated_dl_size_mib}MiB" "" diff --git a/lib/functions/host/prepare-host.sh b/lib/functions/host/prepare-host.sh index 94da4c80d1..ce2b5172ec 100644 --- a/lib/functions/host/prepare-host.sh +++ b/lib/functions/host/prepare-host.sh @@ -6,11 +6,6 @@ # * changes system settings # function prepare_host() { - # Now, if NOT interactive, do some basic checks. If interactive, those have already run back in prep_conf_main_build_single() - if [[ ! -t 1 ]]; then - LOG_SECTION="ni_check_basic_host" do_with_logging check_basic_host - fi - LOG_SECTION="prepare_host_noninteractive" do_with_logging prepare_host_noninteractive return 0 } diff --git a/lib/functions/main/config-prepare.sh b/lib/functions/main/config-prepare.sh index f18e25fe00..99a1a1b4de 100644 --- a/lib/functions/main/config-prepare.sh +++ b/lib/functions/main/config-prepare.sh @@ -5,7 +5,7 @@ function prep_conf_main_build_single() { LOG_SECTION="config_early_init" do_with_conditional_logging config_early_init # if interactive, call prepare-host.sh::check_basic_host() early, to avoid disappointments later. - if [[ -t 1 ]]; then + if [[ -t 0 ]]; then check_basic_host fi @@ -28,6 +28,11 @@ function prep_conf_main_build_single() { LOG_SECTION="config_post_main" do_with_conditional_logging config_post_main + # Now, if NOT interactive, do some basic checks. If interactive, it has been done 20 lines above. + if [[ ! -t 0 ]]; then + LOG_SECTION="ni_check_basic_host" do_with_logging check_basic_host + fi + aggregate_packages_in_logging_section display_alert "Configuration prepared for BOARD build" "${BOARD}.${BOARD_TYPE}" "info"