diff options
-rwxr-xr-x | functions/configuration.sh | 9 | ||||
-rwxr-xr-x | functions/init.sh | 10 |
2 files changed, 10 insertions, 9 deletions
diff --git a/functions/configuration.sh b/functions/configuration.sh index c0c39f250..5c226d4d3 100755 --- a/functions/configuration.sh +++ b/functions/configuration.sh @@ -133,15 +133,6 @@ Prepare_config () APT_OPTIONS="${APT_OPTIONS:---yes}" APTITUDE_OPTIONS="${APTITUDE_OPTIONS:---assume-yes}" - # Apt v2.0.1 introduced color support, but it needs to be explicitly enabled - if [ "${_COLOR_OUT}" = "true" ] && [ "${_COLOR_ERR}" = "true" ]; then - APT_OPTIONS="${APT_OPTIONS} -o APT::Color=true" - APTITUDE_OPTIONS="${APTITUDE_OPTIONS} -o APT::Color=true" - else - APT_OPTIONS="${APT_OPTIONS} -o APT::Color=false" - APTITUDE_OPTIONS="${APTITUDE_OPTIONS} -o APT::Color=false" - fi - BZIP2_OPTIONS="${BZIP2_OPTIONS:--6}" GZIP_OPTIONS="${GZIP_OPTIONS:--6}" LZIP_OPTIONS="${LZIP_OPTIONS:--6}" diff --git a/functions/init.sh b/functions/init.sh index c050b495b..1fbbd9308 100755 --- a/functions/init.sh +++ b/functions/init.sh @@ -29,6 +29,16 @@ Init_config_data () Read_conffiles $(Common_config_files) Prepare_config + + # Apt v2.0.1 introduced color support, but it needs to be explicitly enabled. + # This is done here so that the injection of the option does not get stored in the config file. + if [ "${_COLOR_OUT}" = "true" ] && [ "${_COLOR_ERR}" = "true" ]; then + APT_OPTIONS="${APT_OPTIONS} -o APT::Color=true" + APTITUDE_OPTIONS="${APTITUDE_OPTIONS} -o APT::Color=true" + else + APT_OPTIONS="${APT_OPTIONS} -o APT::Color=false" + APTITUDE_OPTIONS="${APTITUDE_OPTIONS} -o APT::Color=false" + fi } # "Auto" script redirection. |