mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-13 15:04:10 +01:00
Merge pull request #219 from matrix-org/daniel/chdir
Make dump-swagger work from all directories
This commit is contained in:
commit
cb3ca223d0
|
|
@ -12,7 +12,10 @@ import re
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "templating"))
|
templating_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "templating")
|
||||||
|
sys.path.insert(0, templating_dir)
|
||||||
|
os.chdir(templating_dir)
|
||||||
|
|
||||||
from matrix_templates.units import resolve_references, MatrixUnits
|
from matrix_templates.units import resolve_references, MatrixUnits
|
||||||
|
|
||||||
if len(sys.argv) < 2 or len(sys.argv) > 3:
|
if len(sys.argv) < 2 or len(sys.argv) > 3:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue