diff --git a/Scripts/list-earthquakes.ps1 b/Scripts/list-earthquakes.ps1 index 770ce568..0482b151 100755 --- a/Scripts/list-earthquakes.ps1 +++ b/Scripts/list-earthquakes.ps1 @@ -13,12 +13,12 @@ function ListEarthquakes { write-progress "Loading data ..." $Earthquakes = (Invoke-WebRequest -Uri "https://earthquake.usgs.gov/fdsnws/event/1/query?format=$Format&minmagnitude=$MinMagnitude&orderby=$OrderBy" -UserAgent "curl" ).Content | ConvertFrom-CSV foreach ($Quake in $Earthquakes) { - new-object PSObject -Property @{ Magnitude=$Quake.mag; Depth=$Quake.depth; Place=$Quake.place; Time=$Quake.time } + new-object PSObject -Property @{ Mag=$Quake.mag; Depth=$Quake.depth; Location=$Quake.place; Time=$Quake.time } } } try { - ListEarthquakes | format-table -autoSize -property Magnitude,Depth,Place,Time + ListEarthquakes | format-table -property Mag,Location,Depth,Time -autoSize exit 0 } catch { write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Scripts/list-memos.ps1 b/Scripts/list-memos.ps1 index 6ea04102..c0ce42e4 100755 --- a/Scripts/list-memos.ps1 +++ b/Scripts/list-memos.ps1 @@ -23,7 +23,8 @@ try { "$Time $User $Text" } } else { - "Sorry, no $Path file found" + "Sorry, no memos saved yet" + exit 1 } exit 0 } catch {