-
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.
step validation rules, no_validate flag
- Loading branch information
Showing
27 changed files
with
469 additions
and
473 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
from carnival.host import AnyConnection | ||
from invoke import Result # type: ignore | ||
import typing | ||
|
||
from carnival import Connection, Result | ||
|
||
def run(c: AnyConnection, command: str, warn: bool = True, hide: bool = False) -> Result: | ||
|
||
def run(c: Connection, command: str, warn: bool = True, hide: bool = False, cwd: typing.Optional[str] = None) -> Result: | ||
""" | ||
Запустить комманду | ||
См <https://docs.pyinvoke.org/en/latest/api/runners.html> | ||
""" | ||
return c.run(command, pty=True, warn=warn, hide=hide) | ||
return c.run(command, warn=warn, hide=hide, cwd=cwd) | ||
|
||
|
||
def is_cmd_exist(c: Connection, cmd_name: str) -> bool: | ||
return run(c, f"which {cmd_name}", hide=True, warn=True).ok |
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
Oops, something went wrong.