1
0
Fork 0
mirror of synced 2024-06-26 18:20:43 +12:00

getDevice

This commit is contained in:
fogelito 2024-06-16 12:49:34 +03:00
parent 610edc9584
commit d39060e0a8

View file

@ -1451,9 +1451,9 @@ App::setResource('deviceForBuilds', function ($project) {
return getDevice(APP_STORAGE_BUILDS . '/app-' . $project->getId());
}, ['project']);
function getDevice(string $root, ?string $connection = null): Device
function getDevice(string $root, string $connection = ''): Device
{
$connection = empty($connection) ? System::getEnv('_APP_CONNECTIONS_STORAGE', '') : System::getEnv($connection, '');
$connection = !empty($connection) ? $connection : System::getEnv('_APP_CONNECTIONS_STORAGE', '');
if (!empty($connection)) {
$acl = 'private';