Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View vlad-vinogradov's full-sized avatar

vlad-vinogradov

View GitHub Profile
@vlad-vinogradov
vlad-vinogradov / apt-get-wrapper
Created May 23, 2020 11:27
This apt-get wrapper script (bash) is intended mainly for use with Dockerfile. It allows to detect apt-get network errors and to avoid distracting "red" apt-get output.
#!/usr/bin/env bash
#
# "apt-get" wrapper that detects STDERR messages with the prefixes "W:" and "E:"
# and redirect some apt-get STDERR messages to STDOUT.
#
# Returns exit status 120 in case of non-zero apt-get exit status
# or in case of detection of STDERR message with the prefix "W:" or "E:".
#
# The wrapper is intended mainly for use with Dockerfile.
# It allows to detect apt-get network errors