From 10b42fa7479b1169f0b5feda2c7cbb79032e785b Mon Sep 17 00:00:00 2001 From: Roy Lane Date: Wed, 15 Jan 2025 10:42:04 -0500 Subject: [PATCH] check cwd --- scubagoggles/run_rego.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scubagoggles/run_rego.py b/scubagoggles/run_rego.py index 4a70d2ba..39af75ec 100644 --- a/scubagoggles/run_rego.py +++ b/scubagoggles/run_rego.py @@ -61,11 +61,17 @@ def opa_eval(product_name: str, '-d', str(utils_rego), '--format=values'] + debug = True + if debug: # This "explain" option seems to do nothing... command.append('--explain=full') try: + cpe = subprocess.run(['powershell', 'pwd'], shell=True, capture_output=True) + + log.warning('cwd: %s', cpe.stdout.decode()) + log.warning('Running OPA: "%s"', ' '.join(command)) output = subprocess.run(command, capture_output=True, check=True)