Split out of #1 (residual finding reported there after the v1.3.8 fix).
Summary
On a Windows agent, a -c command whose wrapped line exceeds cmd.exe's limit
makes dwshell wait for output that can never arrive: it burns the whole
--timeout and then reports
dwshell: timed out waiting for command to finish
and with the default (no --timeout) it waits forever. Nothing indicates that
the length is the cause.
Mechanism
cmd.exe truncates a typed line past 8190 characters — verified against a
live Windows agent, 8190 passes and 8191 does not, deterministically.
The truncation is silent. Instrumenting the raw terminal stream over an
over-long line shows the __DWSH_BEGIN__ marker arriving and the prompt coming
back, with no error text of any kind — the command is executed truncated, and
what gets cut off the end is exactly dwshell's __DWSH_RC_%errorlevel%_END__
sentinel. dwshell then waits for a marker that will never be sent.
So there is no remote error message to surface here: cmd.exe emits none.
Fix
Reject the command up front, before connecting the shell, with a message that
names the limit and the way around it.
Split out of #1 (residual finding reported there after the v1.3.8 fix).
Summary
On a Windows agent, a
-ccommand whose wrapped line exceeds cmd.exe's limitmakes
dwshellwait for output that can never arrive: it burns the whole--timeoutand then reportsand with the default (no
--timeout) it waits forever. Nothing indicates thatthe length is the cause.
Mechanism
cmd.exe truncates a typed line past 8190 characters — verified against a
live Windows agent, 8190 passes and 8191 does not, deterministically.
The truncation is silent. Instrumenting the raw terminal stream over an
over-long line shows the
__DWSH_BEGIN__marker arriving and the prompt comingback, with no error text of any kind — the command is executed truncated, and
what gets cut off the end is exactly dwshell's
__DWSH_RC_%errorlevel%_END__sentinel.
dwshellthen waits for a marker that will never be sent.So there is no remote error message to surface here: cmd.exe emits none.
Fix
Reject the command up front, before connecting the shell, with a message that
names the limit and the way around it.