prevent escape '#' when generating env_file string

This commit is contained in:
Alan Oliveira
2024-10-15 14:24:09 +09:00
parent 607368121e
commit 844e3acf50
2 changed files with 13 additions and 1 deletions

View File

@@ -37,6 +37,8 @@ class Kamal::EnvFile
def escape_docker_env_file_ascii_value(value)
# Doublequotes are treated literally in docker env files
# so remove leading and trailing ones and unescape any others
value.to_s.dump[1..-2].gsub(/\\"/, "\"")
value.to_s.dump[1..-2]
.gsub(/\\"/, "\"")
.gsub(/\\#/, "#")
end
end