From 462e6e23e51f8a3332827e5bd568885f5bfafcef Mon Sep 17 00:00:00 2001 From: merakor Date: Fri, 24 Jul 2020 14:55:17 +0000 Subject: cpt: remove color enabling/disabling for now FossilOrigin-Name: 97e7368893869832bcc6b29d57005f0114c056ef48e6369ad3b1396f715ca588 --- src/cpt-lib | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src') diff --git a/src/cpt-lib b/src/cpt-lib index d3de070..eaf87cc 100644 --- a/src/cpt-lib +++ b/src/cpt-lib @@ -1359,6 +1359,7 @@ pkg_updates(){ # If the download option is specified only download the outdated packages # and exit. + # shellcheck disable=2154 [ "$download_only" = 1 ] && { log "Only sources for the packages will be acquired" prompt || exit 0 @@ -1504,17 +1505,6 @@ main() { "${log_dir:=$cac_dir/logs}" \ "${bin_dir:=$cac_dir/bin}" - # Disable color escape sequences if running in a subshell. - # This behaviour can be changed by adding a CPT_COLOR - # variable to the environment. If it is set to 1 it will - # always enable color escapes, and if set to 0 it will - # always disable color escapes. - if [ "$CPT_COLOR" = 1 ]; then color=1 - elif [ "$CPT_COLOR" = 0 ] || ! [ -t 1 ]; then - log() { printf '%s %s %s\n' "${3:-->}" "$1" "$2" >&2 ;} - else color=1 - fi - } main "$@" -- cgit v1.2.3