Execute a shell command, exception raised on failure.
(cmd)
| 144 | |
| 145 | |
| 146 | def execute(cmd): |
| 147 | """Execute a shell command, exception raised on failure.""" |
| 148 | shell_setting = "set -e; set -o pipefail; " |
| 149 | logger.info("Execute shell command: `" + cmd + "`, cwd: " + os.getcwd()) |
| 150 | subprocess.check_call(shell_setting + cmd, shell=True, executable="/bin/bash") |
| 151 | |
| 152 | |
| 153 | def ensure_empty_dir(dir, clear_hidden=True): |
no outgoing calls
no test coverage detected