File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ install:
4444 - ECHO "Filesystem root:"
4545 - ps : " ls \" C:/\" "
4646
47- - ECHO "Installed SDKs:"
48- - ps : " ls \" C:/Program Files/Microsoft SDKs/Windows\" "
47+ # - ECHO "Installed SDKs:"
48+ # - ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
4949
5050 # stolen from https://github.com/doxygen/doxygen/blob/master/appveyor.yml
5151 - appveyor-retry appveyor DownloadFile https://miktex.org/download/win/miktexsetup-x64.zip
Original file line number Diff line number Diff line change 1111import tempfile
1212from typing import Union
1313
14+ import urllib
1415try :
1516 from urllib .request import urlopen
1617except ImportError :
@@ -45,8 +46,17 @@ def _get_pandoc_urls(version="latest"):
4546 # url to pandoc download page
4647 url = "https://github.com/jgm/pandoc/releases/" + \
4748 ("tag/" if version != "latest" else "" ) + version
49+ # try to open the url
50+ try :
51+ response = urlopen (url )
52+ content = response .read ()
53+ pattern = re .compile (r"pandoc\s*([\d.]+)" )
54+ version = re .search (pattern , content .decode ("utf-8" )).group (1 )
55+ except urllib .error .HTTPError as e :
56+ raise RuntimeError ("Invalid pandoc version {}." .format (version ))
57+ return
4858 # read the HTML content
49- response = urlopen (url )
59+ response = urlopen ("https://github.com/jgm/pandoc/releases/expanded_assets/" + version )
5060 content = response .read ()
5161 # regex for the binaries
5262 processor_architecture = "arm" if platform .uname ()[4 ].startswith ("arm" ) else "amd"
You can’t perform that action at this time.
0 commit comments