Skip to content

Commit 3c4b8c6

Browse files
committed
Redirect stderr to stdout for apt-get update
1 parent ec971a4 commit 3c4b8c6

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

bin/compile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ APT_OPTIONS=("-o" "debug::nolocking=true" "-o" "dir::cache=$APT_CACHE_DIR" "-o"
7878
APT_OPTIONS+=("-o" "dir::etc::sourcelist=$APT_SOURCES" "-o" "dir::etc::sourceparts=/dev/null")
7979

8080
topic "Updating apt caches"
81-
apt-get "${APT_OPTIONS[@]}" update | indent
81+
apt-get "${APT_OPTIONS[@]}" update 2>&1 | indent
8282

8383
for PACKAGE in $(cat "$BUILD_DIR/Aptfile" | grep -v -s -e '^#' | grep -v -s -e "^:repo:"); do
8484
if [[ $PACKAGE == *deb ]]; then

test/run

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ testCompilePackageNames() {
1010
assertCaptured "Installing mysql-client-core"
1111
assertCaptured "Writing profile script"
1212
assertCaptured "Rewrite package-config files"
13+
assertCapturedSuccess
1314
}
1415

1516
testReportPackageNames() {
@@ -31,6 +32,7 @@ testCompileCustomPackageUrl() {
3132
assertCaptured "Installing wkhtmltox"
3233
assertCaptured "Writing profile script"
3334
assertCaptured "Rewrite package-config files"
35+
assertCapturedSuccess
3436
}
3537

3638
testReportCustomPackageUrl() {
@@ -42,6 +44,7 @@ testReportCustomPackageUrl() {
4244
assertNotCaptured "^packages"
4345
assertCaptured "custom_packages: \"${download_urls[$STACK]}\""
4446
assertNotCaptured "custom_repositories"
47+
assertCapturedSuccess
4548
}
4649

4750
testCompileCustomRepository() {
@@ -57,6 +60,7 @@ testCompileCustomRepository() {
5760
assertCaptured "Installing fasttracker2"
5861
assertCaptured "Writing profile script"
5962
assertCaptured "Rewrite package-config files"
63+
assertCapturedSuccess
6064
}
6165

6266
testReportCustomRepository() {
@@ -68,6 +72,7 @@ testReportCustomRepository() {
6872
assertCaptured "packages: \"fasttracker2\""
6973
assertNotCaptured "custom_packages"
7074
assertCaptured "custom_repositories: \"deb http://us.archive.ubuntu.com/ubuntu/ ${ubuntu_release_names[$STACK]} multiverse\""
75+
assertCapturedSuccess
7176
}
7277

7378
pushd "$(dirname 0)" >/dev/null || exit 1

0 commit comments

Comments
 (0)