Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
There was a problem hiding this comment.
Pull request overview
Adds a “quiet mode” pathway to the VIP dev-environment CLI and Lando bootstrap so informational console output can be suppressed during environment selection and command execution.
Changes:
- Extend
getEnvironmentNamewith aquietargument to suppress the “Using environment …” message when a config-file slug is used. - Thread
quietthroughbootstrapLandoto suppress the “COMMAND LOG FILE” exit output. - Update
vip dev-env execandvip dev-env import sqlto pass--quietinto environment-name resolution (and for exec, into Lando bootstrap).
Reviewed changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/lib/dev-environment/dev-environment-lando.ts | Adds quiet support to Lando bootstrap and suppresses exit-time log-path output. |
| src/lib/dev-environment/dev-environment-cli.ts | Adds quiet parameter to getEnvironmentName to suppress config-file informational output. |
| src/bin/vip-dev-env-import-sql.js | Passes --quiet into environment selection for import-sql. |
| src/bin/vip-dev-env-exec.js | Passes --quiet into env selection and Lando bootstrap for exec. |
| logPathRegistered = true; | ||
| if ( quiet ) { | ||
| return; | ||
| } | ||
|
|
There was a problem hiding this comment.
registerLogPathOutput() sets logPathRegistered = true before the quiet early-return. If this function is first invoked with quiet=true and later invoked with quiet=false in the same process, the exit handler will never be registered and the log-path output will be permanently suppressed. Consider only setting logPathRegistered after deciding to register the exit hook, or tracking registration separately from the resolved log-path computation.
| logPathRegistered = true; | |
| if ( quiet ) { | |
| return; | |
| } | |
| if ( quiet ) { | |
| return; | |
| } | |
| logPathRegistered = true; |
| if ( ! quiet ) { | ||
| console.log( | ||
| `Using environment ${ chalk.blue.bold( slug ) } from ${ chalk.gray( | ||
| configurationFileOptions.meta[ 'configuration-path' ] | ||
| ) }\n` |
There was a problem hiding this comment.
The new quiet behavior suppresses the "Using environment …" informational log when a configuration file slug is used, but there isn't a test asserting the presence/absence of this output. Consider extending the existing getEnvironmentName test suite to verify console.log is called when quiet=false and not called when quiet=true for the configuration-file branch.



Description
This pull request introduces an optional "quiet" mode to suppress console output in the development environment CLI and Lando integration. The main focus is to allow users or calling code to opt out of informational logs and messages during environment setup and bootstrapping.
The most important changes are:
Quiet mode support in CLI and Lando integration:
quietparameter to thegetEnvironmentNamefunction indev-environment-cli.ts, which suppresses console output when set totrue. [1] [2]LandoBootstrapOptionsinterface indev-environment-lando.tsto include aquietproperty, allowing quiet mode to be passed through the bootstrapping process.registerLogPathOutputfunction indev-environment-lando.tsto accept aquietargument and skip log path output whenquietis enabled. [1] [2]bootstrapLandofunction to pass thequietoption toregisterLogPathOutput, ensuring that log output respects the quiet mode setting.Before:

After:

Changelog Description
Fixed
vip dev-env execis run with--quietPull request checklist
New release checklist
Steps to Test
vip dev-env exec -- wp user listmust not display the "COMMAND LOG FILE" message.
When running with a config file, there should be no "Using environment ..." message as well.