This repository was archived by the owner on Jun 7, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,12 @@ def _build_runestone_book(course, click=click):
4242 try :
4343 if os .path .exists ("pavement.py" ):
4444 sys .path .insert (0 , os .getcwd ())
45- from pavement import options , dest , project_name
45+ # Since this may be used in a long running process (see AuthorServer/worker)
46+ # we need to re-import to get the right values
47+ if "pavement" in globals ():
48+ importlib .reload (pavement )
49+ else :
50+ import pavement
4651 else :
4752 click .echo (
4853 "I can't find a pavement.py file in {} you need that to build" .format (
@@ -55,10 +60,10 @@ def _build_runestone_book(course, click=click):
5560 print (e )
5661 return False
5762
58- if project_name != course :
63+ if pavement . project_name != course :
5964 click .echo (
6065 "Error: {} and {} do not match. Your course name needs to match the project_name in pavement.py" .format (
61- course , project_name
66+ course , pavement . project_name
6267 )
6368 )
6469 return False
@@ -75,7 +80,7 @@ def _build_runestone_book(course, click=click):
7580 )
7681 return False
7782 click .echo ("Build succeedeed... Now deploying to published" )
78- if dest != "./published" :
83+ if pavement . dest != "./published" :
7984 click .echo (
8085 "Incorrect deployment directory. dest should be ./published in pavement.py"
8186 )
You can’t perform that action at this time.
0 commit comments