Skip to content

Commit

Permalink
Ensure context attempt does not run as PTY
Browse files Browse the repository at this point in the history
  • Loading branch information
neoxelox committed Feb 12, 2023
1 parent 6286439 commit c0b96da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superinvoke/extensions/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""

Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit c0b96da

Please sign in to comment.