fix docker ssh issue by downgrading phpseclib

This commit is contained in:
Saeed Vaziry
2025-06-19 21:25:25 +02:00
parent 632a56bf4d
commit 9a3578f3ac
8 changed files with 43 additions and 23 deletions

View File

@ -277,3 +277,21 @@ function git_path(): ?string
return array_find($paths, fn ($path) => is_executable($path));
}
function move_directory(string $from, string $to): void
{
// Remove any stale destination
if (File::exists($to)) {
File::deleteDirectory($to);
}
// Ensure parent of $to exists
File::ensureDirectoryExists(dirname($to));
// Copy + delete (works across mounts / volumes)
if (! File::copyDirectory($from, $to)) {
throw new RuntimeException("Could not copy [$from] to [$to]");
}
File::deleteDirectory($from);
}