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
Currently, djin transforms any sequence of commands in a single command joined with &&, although it works fine in most cases, there are some caveats that can cause unexpected behavior, for example when running commands with or, eg:
release:
local:
run:
- command_that_can_fail
- echo 'I am Here' || echo 'I shouldn’t be here'
This will be translated to command_that_can_fail && echo 'I am Here' || echo 'I shouldn’t be here, so if the first command fails will actually execute the echo 'I shouldn’t be here', of course this can be fixed with (), like so:
release:
local:
run:
- command_that_can_fail
- (echo 'I am Here' || echo 'I shouldn’t be here')
But shouldn't be needed.
An easier approach is to insert () when joining every command, but is also not a good solution as can cause other problems, one good solution is to have a shell session that can be handled like a IO object so he can iterate and send each command capturing the STDOUT and STDERR, but must be implemented to handle local commands, docker and docker-compose interactive shells.
The text was updated successfully, but these errors were encountered:
Currently, djin transforms any sequence of commands in a single command joined with
&&
, although it works fine in most cases, there are some caveats that can cause unexpected behavior, for example when running commands with or, eg:This will be translated to
command_that_can_fail && echo 'I am Here' || echo 'I shouldn’t be here
, so if the first command fails will actually execute theecho 'I shouldn’t be here'
, of course this can be fixed with()
, like so:But shouldn't be needed.
An easier approach is to insert
()
when joining every command, but is also not a good solution as can cause other problems, one good solution is to have ashell session
that can be handled like a IO object so he can iterate and send each command capturing the STDOUT and STDERR, but must be implemented to handle local commands, docker and docker-compose interactive shells.The text was updated successfully, but these errors were encountered: