Skip to content

Commit 42759f7

Browse files
committed
revert --yes from apt-get-noninteractive
1 parent 00d9283 commit 42759f7

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

usr/bin/apt-get-noninteractive

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,19 @@ set -e
1414

1515
export POLICYRCD DEBIAN_FRONTEND DEBIAN_PRIORITY DEBCONF_NOWARNINGS APT_LISTCHANGES_FRONTEND NEEDRESTART_MODE
1616

17-
apt-get --yes -o Dpkg::Options::="--force-confask,confnew,confmiss" "$@"
17+
## Not using '--yes'. Reasons:
18+
## Some may want 'apt-get-noninteractive' to include '--yes' as the name suggests.
19+
## Using APT non-interactively is a bit of rocket science.
20+
## A plethora of options and environment variables must be set; nobody wants to do
21+
## that manually.
22+
## One way to use 'apt-get-noninteractive' is to run it and check if its output
23+
## indicates APT might destroy the system (e.g., due to broken packages removing
24+
## a critical package).
25+
## If all is OK, confirm with Enter. Easy.
26+
## If already sure, simply run 'apt-get-noninteractive --yes'.
27+
## If '--yes' were the default, one would need to check the outcome with 'apt-get',
28+
## first then Ctrl+C, then use 'apt-get-noninteractive' to actually proceed.
29+
## It is unknown if 'apt-get-noninteractive' might behave differently due to the
30+
## numerous options passed compared to 'apt-get'.
31+
## This is an opinionated choice.
32+
apt-get -o Dpkg::Options::="--force-confask,confnew,confmiss" "$@"

0 commit comments

Comments
 (0)