File tree 2 files changed +6
-1
lines changed
src/Symfony/Component/Dotenv
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ private function lexValue()
246
246
247
247
++$ this ->cursor ;
248
248
}
249
- $ value = rtrim ($ value );
249
+ $ value = str_replace ( '\\\\' , '\\' , rtrim ($ value) );
250
250
$ resolvedValue = $ value ;
251
251
$ resolvedValue = $ this ->resolveVariables ($ resolvedValue );
252
252
$ resolvedValue = $ this ->resolveCommands ($ resolvedValue );
Original file line number Diff line number Diff line change @@ -66,6 +66,11 @@ public function getEnvData()
66
66
$ _ENV ['REMOTE ' ] = 'remote ' ;
67
67
68
68
$ tests = array (
69
+ // backslashes
70
+ array ('FOO=foo \\\\bar ' , array ('FOO ' => 'foo \\bar ' )),
71
+ array ("FOO='foo \\\\bar' " , array ('FOO ' => 'foo \\\\bar ' )),
72
+ array ('FOO="foo \\\\bar" ' , array ('FOO ' => 'foo \\bar ' )),
73
+
69
74
// spaces
70
75
array ('FOO=bar ' , array ('FOO ' => 'bar ' )),
71
76
array (' FOO=bar ' , array ('FOO ' => 'bar ' )),
You can’t perform that action at this time.
0 commit comments