Skip to content

Commit

Permalink
Redirect stderr to stdout for apt-get update (heroku#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
colincasey authored and Frzk committed May 13, 2024
1 parent 48b2fed commit 35d00ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ APT_OPTIONS=("-o" "debug::nolocking=true" "-o" "dir::cache=$APT_CACHE_DIR" "-o"
APT_OPTIONS+=("-o" "dir::etc::sourcelist=$APT_SOURCES" "-o" "dir::etc::sourceparts=/dev/null")

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

for PACKAGE in $(cat $BUILD_DIR/$APT_FILE_MANIFEST | grep -v -s -e '^#' | grep -v -s -e "^:repo:"); do
if [[ $PACKAGE == *deb ]]; then
Expand Down
5 changes: 5 additions & 0 deletions test/run
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ testCompilePackageNames() {
assertCaptured "Installing mysql-client-core"
assertCaptured "Writing profile script"
assertCaptured "Rewrite package-config files"
assertCapturedSuccess
}

testReportPackageNames() {
Expand All @@ -31,6 +32,7 @@ testCompileCustomPackageUrl() {
assertCaptured "Installing wkhtmltox"
assertCaptured "Writing profile script"
assertCaptured "Rewrite package-config files"
assertCapturedSuccess
}

testReportCustomPackageUrl() {
Expand All @@ -42,6 +44,7 @@ testReportCustomPackageUrl() {
assertNotCaptured "^packages"
assertCaptured "custom_packages: \"${download_urls[$STACK]}\""
assertNotCaptured "custom_repositories"
assertCapturedSuccess
}

testCompileCustomRepository() {
Expand All @@ -57,6 +60,7 @@ testCompileCustomRepository() {
assertCaptured "Installing fasttracker2"
assertCaptured "Writing profile script"
assertCaptured "Rewrite package-config files"
assertCapturedSuccess
}

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

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

0 comments on commit 35d00ed

Please sign in to comment.