add custom path to site env (#629)

This commit is contained in:
Saeed Vaziry
2025-06-25 21:50:07 +02:00
committed by GitHub
parent a593525939
commit f4414a931e
7 changed files with 32 additions and 6 deletions

View File

@ -17,12 +17,15 @@ public function update(Site $site, array $input): void
{
Validator::make($input, [
'env' => ['required', 'string'],
'path' => ['required', 'string'],
])->validate();
$site->server->os()->write(
$site->path.'/.env',
$input['path'],
trim((string) $input['env']),
$site->user,
);
$site->jsonUpdate('type_data', 'env_path', $input['path']);
}
}