mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 14:06:15 +00:00
- 2.x - sites (wip)
- improved ssh error handling - database soft deletes
This commit is contained in:
@ -97,13 +97,17 @@ public function write($buf): void
|
||||
}
|
||||
}
|
||||
|
||||
public function getContent(): ?string
|
||||
public function getContent($lines = null): ?string
|
||||
{
|
||||
if ($this->is_remote) {
|
||||
return $this->server->os()->tail($this->name, 150);
|
||||
return $this->server->os()->tail($this->name, $lines ?? 150);
|
||||
}
|
||||
|
||||
if (Storage::disk($this->disk)->exists($this->name)) {
|
||||
if ($lines) {
|
||||
return tail(Storage::disk($this->disk)->path($this->name), $lines);
|
||||
}
|
||||
|
||||
return Storage::disk($this->disk)->get($this->name);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user