File tree Expand file tree Collapse file tree 3 files changed +13
-8
lines changed
Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 11"""snok"""
22
3- __version__ = "0.0.15 "
3+ __version__ = "0.0.16 "
Original file line number Diff line number Diff line change @@ -23,14 +23,13 @@ def _get_snok_path() -> str:
2323
2424def _run_cmd (
2525 cmd : List [str ],
26- pty : bool = True ,
2726 echo : bool = True ,
2827) -> None : # pragma: no cover
2928 ctx = Context ()
3029 try :
3130 ctx .run (
3231 " " .join (cmd ),
33- pty = pty ,
32+ pty = _check_pty () ,
3433 echo = echo ,
3534 )
3635 except Exception :
Original file line number Diff line number Diff line change 1+ import sys
2+
13from invoke import task
24from invoke .context import Context
35
46
7+ def _check_pty () -> bool :
8+ return sys .platform not in ["win32" , "cygwin" , "msys" ]
9+
10+
511@task
612def docs_build (ctx : Context ) -> None :
713 """docs_build
@@ -10,22 +16,22 @@ def docs_build(ctx: Context) -> None:
1016 """
1117 ctx .run (
1218 "mkdocs build" ,
13- pty = True ,
19+ pty = _check_pty () ,
1420 echo = True ,
1521 )
1622 ctx .run (
1723 "cp ./docs/index.md ./README.md" ,
18- pty = True ,
24+ pty = _check_pty () ,
1925 echo = True ,
2026 )
2127 ctx .run (
2228 "git add ./docs README.md" ,
23- pty = True ,
29+ pty = _check_pty () ,
2430 echo = True ,
2531 )
2632 ctx .run (
2733 "git commit -S -m '📚 Updated docs.'" ,
28- pty = True ,
34+ pty = _check_pty () ,
2935 echo = True ,
3036 )
3137
@@ -38,6 +44,6 @@ def docs_serve(ctx: Context) -> None:
3844 """
3945 ctx .run (
4046 "mkdocs serve --dev-addr 127.0.0.1:8008" ,
41- pty = True ,
47+ pty = _check_pty () ,
4248 echo = True ,
4349 )
You can’t perform that action at this time.
0 commit comments