carpentries / styles

Styles for The Carpentries lessons. No README to avoid merge conflicts with lessons. Demo 👇
https://carpentries.github.io/lesson-example
Other
84 stars 94 forks source link

new python function `using_remote_theme()` needs an argument #576

Closed zkamvar closed 3 years ago

zkamvar commented 3 years ago

The function introduced in #571 to skip checks when using remote theme needs to pass source_dir as an argument otherwise it fails:

Run make lesson-check-all
Traceback (most recent call last):
  File "/home/runner/work/lesson-example/lesson-example/bin/lesson_check.py", line 577, in <module>
    main()
  File "/home/runner/work/lesson-example/lesson-example/bin/lesson_check.py", line 118, in main
    if not using_remote_theme():
  File "/home/runner/work/lesson-example/lesson-example/bin/lesson_check.py", line 174, in using_remote_theme
    config_file = os.path.join(source_dir, '_config.yml')
NameError: name 'source_dir' is not defined
make: *** [Makefile:142: lesson-check-all] Error 1

https://github.com/carpentries/styles/blob/4df505249a27191c3475102cde4c150b0a131102/bin/lesson_check.py#L173-L176