sct/lib/sct/commands/dev.rb in sct-1.3.0 vs sct/lib/sct/commands/dev.rb in sct-1.4.0
- old
+ new
@@ -8,16 +8,21 @@
def error message
UI.error message
exit 1
end
+ def dc_system
+ return executer = system("which docker-compose") ? 'docker-compose' : 'docker compose'
+ end
+
def dc command, env = {}
- system env, "docker-compose -f ~/development/spend-cloud/docker-compose.yml #{command}"
+ system env, "#{dc_system} -f ~/development/spend-cloud/docker-compose.yml #{command}"
end
def dc_dev command, env = {}
- system env, "docker-compose -f #{@@file} #{command}"
+
+ system env, "#{dc_system} -f #{@@file} #{command}"
end
def manifest
if !File.exist? @@file
error "Could not find file '#{@@file}'."
@@ -25,9 +30,12 @@
YAML.load File.read @@file
end
def execute args, options
+
+ UI.message('Trying to start development environment')
+
services = manifest["services"].to_a
if Sct::Helper.is_windows?
host_machine_IP = (options.wsl_debugger ? `hostname -I | awk '{print $1}'` : `powershell.exe -c '(Test-Connection -ComputerName $env:computername -count 1).ipv4address.IPAddressToString' | dos2unix`).chomp
elsif Sct::Helper.is_mac_os?