You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
oc rsh pod/<podname> --flag1 --flag2 does not consider --flag1 and --flag2 as actual flags, rather as arguments to be executed on 's top level container. The only way to get --flag1 to work is to pass it before pod/<podname>.
A solution to this could be to filter out args specified to the right of a resource that have the form ^-(-)?[a-zA-Z0-9]+(=.*)?, and have their value saved in RshOptions (or true if no =.*).
oc rsh pod idling-echo-1-sunqu --no-tty echo "hello world"
Current Result
oc rsh pod idling-echo-1-sunqu --no-tty echo "hello world"
--no-tty flag is ignored, pseudo-terminal is still allocated
oc rsh --no-tty pod idling-echo-1-sunqu echo "hello world"
flag works as expected, no pseudo-terminal is allocated, and command echo "hello world" still executes in the container.
Expected Result
flag to the right of pod idling-echo-1-sunqu should be acknowledged, no pseudo-terminal should be allocated, command should run in container, and exit when done.
The text was updated successfully, but these errors were encountered:
@liggitt Okay, thanks for clarifying. I can go ahead and close the bugzilla.
Should there be a mention somewhere in the command's usage output that tells the user to place flags before the specified resource?
Related BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1340554
Related Trello card: https://trello.com/c/04lpfTQR/451-8-cli-improved-flows-and-ux-in-the-cli-evg-ux-p3
oc rsh pod/<podname> --flag1 --flag2
does not consider--flag1
and--flag2
as actual flags, rather as arguments to be executed on 's top level container. The only way to get--flag1
to work is to pass it beforepod/<podname>
.A solution to this could be to filter out args specified to the right of a resource that have the form
^-(-)?[a-zA-Z0-9]+(=.*)?
, and have their value saved inRshOptions
(ortrue
if no=.*
).Version
oc v1.3.0-alpha.0+d0df369-dirty
kubernetes v1.3.0+507d3a7
features: Basic-Auth
Steps To Reproduce
oc rsh pod idling-echo-1-sunqu --no-tty echo "hello world"
Current Result
oc rsh pod idling-echo-1-sunqu --no-tty echo "hello world"
--no-tty
flag is ignored, pseudo-terminal is still allocatedoc rsh --no-tty pod idling-echo-1-sunqu echo "hello world"
echo "hello world"
still executes in the container.Expected Result
pod idling-echo-1-sunqu
should be acknowledged, no pseudo-terminal should be allocated, command should run in container, and exit when done.The text was updated successfully, but these errors were encountered: