Pop instead of reversing

This commit is contained in:
Kevin Sawicki
2014-11-13 13:39:01 -08:00
parent ddbb0ae1db
commit f9b27aecf5

View File

@@ -39,7 +39,7 @@ class AutoUpdater
try
# Last line of output is the JSON details about the releases
[json] = stdout.trim().split('\n').reverse()
json = stdout.trim().split('\n').pop()
update = JSON.parse(json)?.releasesToApply?.pop?()
catch error
error.stdout = stdout