From db1b7bfd5c714f46d2fe48801760bbe0774c4466 Mon Sep 17 00:00:00 2001 From: Colin Casey Date: Wed, 20 Mar 2024 12:13:22 -0300 Subject: [PATCH] Redirect stderr to stdout for apt-get update --- bin/compile | 2 +- test/run | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/compile b/bin/compile index 2f98554..1cc710c 100755 --- a/bin/compile +++ b/bin/compile @@ -78,7 +78,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/Aptfile" | grep -v -s -e '^#' | grep -v -s -e "^:repo:"); do if [[ $PACKAGE == *deb ]]; then diff --git a/test/run b/test/run index 843f6d3..4b90157 100755 --- a/test/run +++ b/test/run @@ -10,6 +10,7 @@ testCompilePackageNames() { assertCaptured "Installing mysql-client-core" assertCaptured "Writing profile script" assertCaptured "Rewrite package-config files" + assertCapturedSuccess } testReportPackageNames() { @@ -31,6 +32,7 @@ testCompileCustomPackageUrl() { assertCaptured "Installing wkhtmltox" assertCaptured "Writing profile script" assertCaptured "Rewrite package-config files" + assertCapturedSuccess } testReportCustomPackageUrl() { @@ -42,6 +44,7 @@ testReportCustomPackageUrl() { assertNotCaptured "^packages" assertCaptured "custom_packages: \"${download_urls[$STACK]}\"" assertNotCaptured "custom_repositories" + assertCapturedSuccess } testCompileCustomRepository() { @@ -57,6 +60,7 @@ testCompileCustomRepository() { assertCaptured "Installing fasttracker2" assertCaptured "Writing profile script" assertCaptured "Rewrite package-config files" + assertCapturedSuccess } testReportCustomRepository() { @@ -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