coolify icon indicating copy to clipboard operation
coolify copied to clipboard

[Bug]: Env string variables containing a double ($$) gets one $ removed

Open vnguyen42 opened this issue 1 year ago • 1 comments

Description

When an env variable is defined as a string and it contains two $ (like "@_String$$"), one of the $ will get removed at run time.

env_setup output_wrong_var

Minimal Reproduction (if possible, example repository)

Steps to reproduce:

  • Define an env variable as something like : String$$
  • Deploy (in my case a JS app using process.env)
  • Log => The variable now has only one "$", for example: String$

Exception or Error

No response

Version

v4.0.0-beta.258

vnguyen42 avatar Apr 14 '24 16:04 vnguyen42

The upcoming version will address this issue by introducing a new variable option called 'Is Literal?'.

This option will allow the $ sign to be escaped, ensuring that it is used literally even if it appears in the values with some characters after it by default, as explained here.

andrasbacsai avatar Apr 15 '24 10:04 andrasbacsai