Env icon indicating copy to clipboard operation
Env copied to clipboard

escaped backslash not converted to real backslash

Open PawelSuwinski opened this issue 3 years ago • 1 comments

$ cat /tmp/test.env 
TEST="namespace\\class"

$ source /tmp/test.env && echo $TEST
namespace\class  

$ php -r 'require_once "vendor/autoload.php"; echo  M1\Env\Parser::parse(file_get_contents("/tmp/test.env"))["TEST"].PHP_EOL;'
namespace\\class

expected: namespace\class

PawelSuwinski avatar May 11 '22 07:05 PawelSuwinski

I think the same with '\$' => '$' to achieve bash .env support as stated in doc:

This library will always be able to parse bash syntax (...)

PawelSuwinski avatar May 11 '22 08:05 PawelSuwinski