diff --git a/lib/kaiser/cli.rb b/lib/kaiser/cli.rb index 04b1c94a..d8c6938c 100644 --- a/lib/kaiser/cli.rb +++ b/lib/kaiser/cli.rb @@ -229,7 +229,7 @@ def current_branch_db_image_dir def db_image_path(name) if name.start_with?('./') - path = "#{`pwd`.chomp}/#{name.sub('./', '')}" + path = "#{home_dir_loc}/#{name.sub('./', '')}" Config.info_out.puts "Database image path is: #{path}" return path end @@ -542,6 +542,12 @@ def selenium_node_image 'selenium/standalone-chrome-debug' end + def home_dir_loc + return ENV['_KAISER_USER_HOME'] if ENV['_KAISER_POS'] == 'docker' + + ENV['HOME'] + end + def ensure_setup ensure_env @@ -571,9 +577,6 @@ def ensure_setup jwilder/nginx-proxy" ) - homedir_loc = ENV['HOME'] - homedir_loc = ENV['_KAISER_USER_HOME'] if ENV['_KAISER_POS'] == 'docker' - innerdnsconffile = "#{ENV['HOME']}/.kaiser/dnsconf" outerdnsconffile = "#{homedir_loc}/.kaiser/dnsconf" File.write(innerdnsconffile, <<~HOSTS)