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
The fix for #113 broke our own dip.ymls with no beautiful way to fix it.
We have many command chains in them like command: nvm use 12 && nvm run test. Since #113, the second part of the command will be executed on the host and not inside the container. Also note that it also breaks any backtick ` as the command will be ran on the host.
To Reproduce
entrypoint.sh:
#!/bin/bashset -e
echo"$@"eval"$@"
Dockerfile:
FROM ruby:2.7
COPY entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
There's a workaround that works for us but makes the dip.yml quite ugly. We could wrap any command in '''original command''' or "'original command'". This work around works both in 6.1 and 7.0.
The solutions I can see are:
Providing an option for a command: in the dip.yml, for an interaction specifying safe: true will automatically wrap the command in quotes.
Automatically detect if there's a , a ||or a&&` in the command and then automatically wrapping.
Always wrap
Instead of wrapping we could also use the old code/behaviour.
In any case, if we can find a solution that works for everyone I will gladly make the PR for this.
The text was updated successfully, but these errors were encountered:
Describe the bug
The fix for #113 broke our own
dip.yml
s with no beautiful way to fix it.We have many command chains in them like
command: nvm use 12 && nvm run test
. Since #113, the second part of the command will be executed on the host and not inside the container. Also note that it also breaks any backtick ` as the command will be ran on the host.To Reproduce
entrypoint.sh:
Dockerfile:
docker-compose.yml
dip.yml
All output are created with
DIP_ENV=debug
With
dip 6.1.0
(expected behaviour)dip test_chain
dip test_backquote
With
dip 7.0.1
(new behaviour)dip test_chain
dip test_backquote
Context
Workaround and proposed solution
There's a workaround that works for us but makes the
dip.yml
quite ugly. We could wrap any command in'''original command'''
or"'original command'"
. This work around works both in6.1
and7.0
.The solutions I can see are:
dip.yml
, for aninteraction
specifyingsafe: true
will automatically wrap the command in quotes., a
||or a
&&` in the command and then automatically wrapping.In any case, if we can find a solution that works for everyone I will gladly make the PR for this.
The text was updated successfully, but these errors were encountered: