Fix container and add dry run ability.
This commit is contained in:
parent
d1b91a0a89
commit
43114d8c1f
4 changed files with 14 additions and 2 deletions
|
@ -1,4 +1,13 @@
|
|||
import subprocess
|
||||
import logging
|
||||
|
||||
_DRY_RUN = False
|
||||
|
||||
def set_is_dry_run(is_dry_run: bool):
|
||||
_DRY_RUN = is_dry_run
|
||||
|
||||
def run_op(op: str):
|
||||
return subprocess.run(op, shell=True)
|
||||
if _DRY_RUN:
|
||||
return subprocess.run(op, shell=True)
|
||||
else:
|
||||
logging.info(f"Dry Run | {op}")
|
Loading…
Add table
Add a link
Reference in a new issue