Fix env template path check and tests

This commit is contained in:
David Heinemeier Hansson
2024-05-14 10:07:31 -07:00
parent 938ac375a1
commit e58d2f67f2
2 changed files with 4 additions and 3 deletions

View File

@@ -186,7 +186,7 @@ class Kamal::Cli::Main < Kamal::Cli::Base
env_path = ".env"
end
if File.exist?(env_template_path)
if Pathname.new(File.expand_path(env_template_path)).exist?
File.write(env_path, ERB.new(File.read(env_template_path), trim_mode: "-").result, perm: 0600)
unless options[:skip_push]