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))
         )
 
diff --git a/recipe_modules/environment/tests/full.expected/normal.json b/recipe_modules/environment/tests/full.expected/normal.json
index 8350371..cf55ff8 100644
--- a/recipe_modules/environment/tests/full.expected/normal.json
+++ b/recipe_modules/environment/tests/full.expected/normal.json
@@ -3,6 +3,8 @@
     "cmd": [],
     "name": "environment",
     "~followup_annotations": [
+      "@@@STEP_LOG_LINE@config.json@''@@@",
+      "@@@STEP_LOG_END@config.json@@@",
       "@@@STEP_LOG_LINE@vars.json@{'modify': {'LD_LIBRARY_PATH': {'prepend': ['/environment/lib']},@@@",
       "@@@STEP_LOG_LINE@vars.json@            'PATH': {'append': ['/environment/bin']}},@@@",
       "@@@STEP_LOG_LINE@vars.json@ 'set': {'VIRTUAL_ENV': '/environment/virtualenv'}}@@@",
diff --git a/recipe_modules/environment/tests/full.expected/windows.json b/recipe_modules/environment/tests/full.expected/windows.json
index 81ef449..ddd64be 100644
--- a/recipe_modules/environment/tests/full.expected/windows.json
+++ b/recipe_modules/environment/tests/full.expected/windows.json
@@ -3,6 +3,8 @@
     "cmd": [],
     "name": "environment",
     "~followup_annotations": [
+      "@@@STEP_LOG_LINE@config.json@''@@@",
+      "@@@STEP_LOG_END@config.json@@@",
       "@@@STEP_LOG_LINE@vars.json@{'modify': {'LD_LIBRARY_PATH': {'prepend': ['/environment/lib']},@@@",
       "@@@STEP_LOG_LINE@vars.json@            'PATH': {'append': ['/environment/bin']}},@@@",
       "@@@STEP_LOG_LINE@vars.json@ 'set': {'VIRTUAL_ENV': '/environment/virtualenv'}}@@@",