environment: Fix misleading logs
The config passed into pw_env_setup was saved as 'vars.json' and then
the output of pw_env_setup was saved as 'vars.json' for the same step,
which appeared misleading. Save the config as 'config.json' so
'vars.json' only shows up if pw_env_setup completed successfully.
Bug: b/240494446
Change-Id: Id69796707d2f955620c0def6498ec05b72c8a325
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/103685
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Reviewed-by: Ted Pudlik <tpudlik@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
diff --git a/recipe_modules/environment/api.py b/recipe_modules/environment/api.py
index fadb9b2..8fc9e12 100644
--- a/recipe_modules/environment/api.py
+++ b/recipe_modules/environment/api.py
@@ -160,7 +160,7 @@
cmd.extend(('--config-file', path(config_file)))
- top_presentation.logs['vars.json'] = pprint.pformat(
+ top_presentation.logs['config.json'] = pprint.pformat(
self.m.file.read_json('read config', path(config_file))
)