Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
argo
nrm
Commits
e62f7ad0
Commit
e62f7ad0
authored
Jan 04, 2019
by
Valentin Reis
Browse files
[fix] Printing application stdout and stderr correctly (with tangling of cmd log on stderr.)
parent
14766d2d
Pipeline
#4828
failed with stages
in 1 minute and 8 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bin/cmd
View file @
e62f7ad0
...
...
@@ -118,13 +118,17 @@ class CommandLineInterface(object):
assert
msg
.
type
in
[
'stdout'
,
'stderr'
,
'exit'
,
'process_exit'
]
if
msg
.
type
==
'stdout'
:
logger
.
info
(
"container msg: %r"
,
msg
)
logger
.
debug
(
"container msg: %r"
,
msg
)
if
msg
.
payload
==
'eof'
:
outeof
=
True
else
:
print
(
msg
.
payload
)
elif
msg
.
type
==
'stderr'
:
logger
.
info
(
"container msg: %r"
,
msg
)
logger
.
debug
(
"container msg: %r"
,
msg
)
if
msg
.
payload
==
'eof'
:
erreof
=
True
else
:
print
(
msg
.
payload
,
file
=
sys
.
stderr
)
elif
msg
.
type
==
'process_exit'
:
logger
.
info
(
"process ended: %r"
,
msg
)
state
=
'exiting'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment