get-port: / characters are replaced internally.

This commit is contained in:
Luka Vandervelden 2019-10-24 15:48:03 +02:00
parent 5ab14d4ee4
commit 60dc0917d4

View File

@ -7,7 +7,7 @@ PORTS_CACHE_DIRECTORY = "#{CACHE_DIRECTORY}/ports/"
service = ARGV[0]
wanted_default_port = ARGV[1]?.try &.to_i
service_port_file = "#{PORTS_CACHE_DIRECTORY}/#{service}"
service_port_file = "#{PORTS_CACHE_DIRECTORY}/#{service.gsub /\//, ":"}"
begin
if File.exists? service_port_file