-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename
print_cmd
to logged_command
, move it to utils
- Loading branch information
1 parent
6aa7d74
commit f79b198
Showing
3 changed files
with
17 additions
and
22 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import subprocess | ||
|
||
|
||
def logged_command(context, command, **kwargs): | ||
context.log.info(f"Running command: {' '.join(command)}") | ||
context.log.info( | ||
subprocess.check_output( | ||
command, stderr=subprocess.STDOUT, encoding="utf-8", **kwargs | ||
) | ||
) |