aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cpt-lib12
1 files changed, 1 insertions, 11 deletions
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 "$@"