sg: add debug-env command (#25509)

To debug environment you can run `sg run debug-env` to see the computed
environment.
This commit is contained in:
Keegan Carruthers-Smith 2021-09-30 09:23:24 +02:00 committed by GitHub
parent f2a20455f8
commit cfdb1b7b33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -222,6 +222,8 @@ To modify your configuration locally, you can overwrite chunks of configuration
If an `sg.config.overwrite.yaml` file exists, its contents will be merged with the content of `sg.config.yaml`, overwriting where there are conflicts. This is useful for running custom command sets or adding environment variables
specific to your work.
You can run `sg run debug-env` to see the environment variables passed `sg`'s child processes.
### Examples
#### Changing database configuration

View File

@ -656,6 +656,11 @@ commands:
- monitoring
continueWatchOnExit: true
# This will execute `env`, a utility to print the process environment. Can
# be used to debug which global vars `sg` uses.
debug-env:
cmd: env
checks:
docker:
cmd: docker version