lib/neptuno/docker/log.rb in neptuno-1.0.5 vs lib/neptuno/docker/log.rb in neptuno-1.0.6

- old
+ new

@@ -5,12 +5,15 @@ class Log < Neptuno::CLI::Base include ::Neptuno::TTY::Config desc "Docker: Show a container's log" def call(**options) - dd = config.fetch('docker_delimiter') || '-' command_service_to('log', service_as_args: options[:args].first) do |service, project| - system("cd #{neptuno_path} && docker logs -f #{project}#{dd}#{service}#{dd}1") + success = system("cd #{neptuno_path} && docker logs -f #{project}_#{service}_1") + unless success + puts "Trying #{project}-#{services.first}-1" + system("cd #{neptuno_path} && docker logs -f #{project}-#{service}-1") + end end end end end end