Skip to content

Commit

Permalink
Merge pull request #104 from mickaelperrin/issue/103-fix-sed-incompat…
Browse files Browse the repository at this point in the history
…ibility

[BUGFIX #103] Unison reports too many roots
  • Loading branch information
EugenMayer authored Aug 9, 2016
2 parents 9c801b3 + ccf1c0f commit d9c302c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/docker-sync/sync_strategy/unison.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def start_container
end

def get_host_port(container_name, container_port)
cmd = 'docker inspect --format=" {{ .NetworkSettings.Ports }} " ' + container_name + ' | sed "s/.*map\[' + container_port + '[^ ]\+\s\([0-9]\+\).*/\1/"'
cmd = 'docker inspect --format=" {{ .NetworkSettings.Ports }} " ' + container_name + ' | /usr/bin/sed -E "s/.*map\[' + container_port + '[^ ]+ ([0-9]*)[^0-9].*/\1/"'
say_status 'command', cmd, :white if @options['verbose']
stdout, stderr, exit_status = Open3.capture3(cmd)
if not exit_status.success?
Expand Down

0 comments on commit d9c302c

Please sign in to comment.