From c0b96dab095e260cd3cb2d492183f1a6d64321b4 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 12 Feb 2023 01:39:49 +0100 Subject: [PATCH] Ensure context attempt does not run as PTY --- superinvoke/extensions/context.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/superinvoke/extensions/context.py b/superinvoke/extensions/context.py index 66e388e..c42fd1e 100644 --- a/superinvoke/extensions/context.py +++ b/superinvoke/extensions/context.py @@ -53,7 +53,7 @@ def warn(message: str) -> None: def attempt(context: Context, command: str) -> str: try: # TODO: If input is required fail directly - result = context.run(command, warn=True, hide="both") + result = context.run(command, warn=True, hide="both", pty=False) except Exception: return "" @@ -100,7 +100,7 @@ def tag(context: Context, current: bool = True) -> Optional[str]: return result -# Gets the N last changes. +# Gets the N last file changed. def changes(context: Context, scope: int = 1) -> List[str]: return context.attempt(f"git diff --name-only HEAD HEAD~{scope}").split("\n")