From 895dfe3c873e2e8c4508d6519c0ae3eeb300ee85 Mon Sep 17 00:00:00 2001 From: Neil Ray Date: Tue, 3 Nov 2020 19:17:40 +0000 Subject: [PATCH] Patch for repositories using 'main' instead of 'master' --- oppm/lib/oppm.lua | 5 ++++- oppm/oppm.lua | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/oppm/lib/oppm.lua b/oppm/lib/oppm.lua index e24c3ea..ff3edf6 100644 --- a/oppm/lib/oppm.lua +++ b/oppm/lib/oppm.lua @@ -43,7 +43,10 @@ end local function getPackages(repo) local success, sPackages = pcall(getContent,"https://raw.githubusercontent.com/"..repo.."/master/programs.cfg") if not success or not sPackages then - return -1 + success, sPackages = pcall(getContent,"https://raw.githubusercontent.com/"..repo.."/main/programs.cfg") + if not success or not sPackages then + return -1 + end end return serial.unserialize(sPackages) end diff --git a/oppm/oppm.lua b/oppm/oppm.lua index 7355456..15705ce 100644 --- a/oppm/oppm.lua +++ b/oppm/oppm.lua @@ -164,7 +164,10 @@ end) local getPackages = cached(function(repo) local success, sPackages = pcall(getContent,"https://raw.githubusercontent.com/"..repo.."/master/programs.cfg") if not success or not sPackages then - return -1 + success, sPackages = pcall(getContent,"https://raw.githubusercontent.com/"..repo.."/main/programs.cfg") + if not success or not sPackages then + return -1 + end end return serial.unserialize(sPackages) end)