fix data naming conflict
This commit is contained in:
parent
5ee29c6072
commit
5aaad66fe5
@ -358,10 +358,10 @@ public function isLogDrainEnabled()
|
||||
public function validateOS(): bool | Stringable
|
||||
{
|
||||
$os_release = instant_remote_process(['cat /etc/os-release'], $this);
|
||||
$data = collect(explode("\n", $os_release));
|
||||
$releaseLines = collect(explode("\n", $os_release));
|
||||
$collectedData = collect([]);
|
||||
foreach ($data as $data) {
|
||||
$item = Str::of($data)->trim();
|
||||
foreach ($releaseLines as $line) {
|
||||
$item = Str::of($line)->trim();
|
||||
$collectedData->put($item->before('=')->value(), $item->after('=')->lower()->replace('"', '')->value());
|
||||
}
|
||||
$ID = data_get($collectedData, 'ID');
|
||||
|
Loading…
Reference in New Issue
Block a user