Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
fix another pwd thing
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsiaw committed Jul 19, 2024
1 parent f973e65 commit c020e71
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/kaiser/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit c020e71

Please sign in to comment.