fix: $ in env variable
feat: multiline envs
This commit is contained in:
@@ -557,7 +557,8 @@ function convert_docker_run_to_compose(?string $custom_docker_run_options = null
|
||||
return $compose_options->toArray();
|
||||
}
|
||||
|
||||
function validateComposeFile(string $compose, int $server_id): string|Throwable {
|
||||
function validateComposeFile(string $compose, int $server_id): string|Throwable
|
||||
{
|
||||
return 'OK';
|
||||
try {
|
||||
$uuid = Str::random(10);
|
||||
@@ -578,3 +579,10 @@ function validateComposeFile(string $compose, int $server_id): string|Throwable
|
||||
], $server);
|
||||
}
|
||||
}
|
||||
|
||||
function escapeEnvVariables($value)
|
||||
{
|
||||
$search = array("\\", "\r", "\t", "\x0", '"', "'", "$");
|
||||
$replace = array("\\\\", "\\r", "\\t", "\\0", '\"', "\'", "$$");
|
||||
return str_replace($search, $replace, $value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user