Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect stderr to stdout for apt-get update #122

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -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
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