kopia lustrzana https://github.com/jupyterhub/repo2docker
Ensure output arrives on stderr
rodzic
044e112bae
commit
f2ed09bdfb
|
@ -15,10 +15,10 @@ if [[ ! -z "${R2D_ENTRYPOINT:-}" ]]; then
|
|||
if [[ ! -x "$R2D_ENTRYPOINT" ]]; then
|
||||
chmod u+x "$R2D_ENTRYPOINT"
|
||||
fi
|
||||
exec "$R2D_ENTRYPOINT" "$@" >&"$log_fd" 2>&1
|
||||
exec "$R2D_ENTRYPOINT" "$@" >&"$log_fd"
|
||||
else
|
||||
exec "$@" >&"$log_fd" 2>&1
|
||||
exec "$@" >&"$log_fd"
|
||||
fi
|
||||
|
||||
# Close the loggging output aggain
|
||||
exec {log_fd}>&-
|
||||
# Close the logging output again
|
||||
#exec {log_fd}>&-
|
||||
|
|
|
@ -58,6 +58,10 @@ def test_env():
|
|||
|
||||
# all docker output is returned by repo2docker on stderr
|
||||
# extract just the declare for better failure message formatting
|
||||
# stdout should be empty
|
||||
assert not result.stdout
|
||||
|
||||
# stderr should contain lines of output
|
||||
declares = [x for x in result.stderr.split("\n") if x.startswith("declare")]
|
||||
assert 'declare -x FOO="{}"'.format(ts) in declares
|
||||
assert 'declare -x BAR="baz"' in declares
|
||||
|
|
Ładowanie…
Reference in New Issue