diff --git a/Scripts/check-smart-devices.ps1 b/Scripts/check-smart-devices.ps1 index d77ce44e..2b6031a1 100755 --- a/Scripts/check-smart-devices.ps1 +++ b/Scripts/check-smart-devices.ps1 @@ -47,9 +47,7 @@ try { continue } elseif ($IsLinux) { $Details = (sudo smartctl --all --json $Device) | ConvertFrom-Json - if ($lastExitCode -ne "0") { throw "'sudo smartctl --all --json $Device' exited with error code $lastExitCode" } $null = (sudo smartctl --test=short $Device) - if ($lastExitCode -ne "0") { throw "'sudo smartctl --test=short $Device' exited with error code $lastExitCode" } } else { $Details = (smartctl --all --json $Device) | ConvertFrom-Json $null = (smartctl --test=short $Device) @@ -73,4 +71,4 @@ try { } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" exit 1 -} \ No newline at end of file +}