mirror of
https://github.com/daylinmorgan/yartsu.git
synced 2024-12-22 04:20:44 -06:00
fix: don't source _run_cmd on windows
This commit is contained in:
parent
f1077adc9f
commit
9044248896
1 changed files with 5 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
||||||
import io
|
import io
|
||||||
|
import platform
|
||||||
import sys
|
import sys
|
||||||
import textwrap
|
import textwrap
|
||||||
from argparse import SUPPRESS, FileType
|
from argparse import SUPPRESS, FileType
|
||||||
|
@ -9,7 +10,6 @@ from rich.text import Text
|
||||||
|
|
||||||
from ._argparse import ArgumentParser
|
from ._argparse import ArgumentParser
|
||||||
from ._export_format import CONSOLE_SVG_FORMAT
|
from ._export_format import CONSOLE_SVG_FORMAT
|
||||||
from ._run_cmd import run_cmd
|
|
||||||
from ._version import __version__
|
from ._version import __version__
|
||||||
from .console import Console
|
from .console import Console
|
||||||
from .term import term
|
from .term import term
|
||||||
|
@ -101,6 +101,10 @@ def main() -> None:
|
||||||
|
|
||||||
elif args.cmd:
|
elif args.cmd:
|
||||||
cmd = " ".join(args.cmd)
|
cmd = " ".join(args.cmd)
|
||||||
|
if platform.system() == "windows":
|
||||||
|
term.print("[CmdError]: cmd mode is not supported on Windows", err=True)
|
||||||
|
sys.exit(1)
|
||||||
|
from ._run_cmd import run_cmd
|
||||||
|
|
||||||
try:
|
try:
|
||||||
returncode, captured_output = run_cmd(cmd)
|
returncode, captured_output = run_cmd(cmd)
|
||||||
|
|
Loading…
Reference in a new issue