Skip to content

Commit

Permalink
fix check exts error
Browse files Browse the repository at this point in the history
  • Loading branch information
wjz304 committed Aug 16, 2022
1 parent 1a05ede commit 62ff464
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -389,17 +389,10 @@ jobs:
if ext != '':
try:
import wget
except ModuleNotFoundError:
os.system('pip3 install wget')
import wget
if os.path.exists('rpExtsFile'):
os.remove('rpExtsFile')
res = wget.download('https://raw.githubusercontent.com/pocopico/rp-ext/main/exts', out='rpExtsFile')
with open('rpExtsFile', mode="r") as f:
rpExts = f.readlines()
rpExts = [x.strip() for x in rpExts]
rpExts = {}
with open('exts.json', mode="r") as f:
rpExts = json.loads(f.read())
rpExts = rpExts[platform.replace('+', 'p').lower() + '_' + version.split('-')[-1]]
exts = [x.strip() for x in re.split(',| |\|', ext) if x.strip() != '']
if len(exts) > 0 and set(exts) <= set(rpExts):
ext = ','.join(exts)
Expand Down

0 comments on commit 62ff464

Please sign in to comment.