Update samy.ps1
This commit is contained in:
10
samy.ps1
10
samy.ps1
@@ -978,10 +978,13 @@ function Get-UIHtml {
|
||||
|
||||
function Get-SamyTasks {
|
||||
[CmdletBinding()]
|
||||
param()
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Url
|
||||
)
|
||||
|
||||
try {
|
||||
$json = Get-RemoteText -Url $Script:SamyTasksUrl
|
||||
$json = Get-RemoteText -Url $Url
|
||||
if ([string]::IsNullOrWhiteSpace($json)) {
|
||||
throw "Tasks JSON was empty."
|
||||
}
|
||||
@@ -995,12 +998,13 @@ function Get-SamyTasks {
|
||||
return $tasks
|
||||
}
|
||||
catch {
|
||||
Write-LogHybrid "Failed to load samy.tasks.json: $($_.Exception.Message). Falling back to embedded tasks." Warning UI -LogToEvent
|
||||
Write-LogHybrid "Failed to load tasks from ${Url}: $($_.Exception.Message)" Warning UI -LogToEvent
|
||||
return $null
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion UIHtml
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user