-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd cleanup, step context builder removed
- Loading branch information
Showing
18 changed files
with
141 additions
and
516 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,11 @@ | ||
from typing import Any | ||
|
||
from carnival import connection | ||
from carnival.host import AnyConnection | ||
from invoke import Result # type: ignore | ||
|
||
|
||
def _run_command(command: str, **kwargs: Any) -> Result: | ||
assert connection.conn is not None, "No connection" | ||
return connection.conn.run(command, **kwargs) | ||
|
||
|
||
def run(command: str, **kwargs: Any) -> Result: | ||
def run(c: AnyConnection, command: str, warn: bool = True, hide: bool = False) -> Result: | ||
""" | ||
Запустить комманду | ||
""" | ||
return _run_command(command, **kwargs) | ||
|
||
|
||
def pty(command: str, **kwargs: Any) -> Result: | ||
""" | ||
Запустить комманду, используя псевдотерминальную сессию | ||
См <https://docs.pyinvoke.org/en/latest/api/runners.html> | ||
""" | ||
return run(command, pty=True, **kwargs) | ||
return c.run(command, pty=True, warn=warn, hide=hide) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.