Skip to content

Commit b24ed74

Browse files
authored
Fix SQLite plugin logging to respect skip option (#2924)
## Motivation for the change, related issues Fixes logging in the CLI blueprints handler to display "Skipping SQLite integration plugin setup..." when `--skip-sqlite-setup` is used, instead of always showing "Fetching SQLite integration plugin..." regardless of the skip option. ## Implementation details Modified `packages/playground/cli/src/blueprints-v1/blueprints-v1-handler.ts` to conditionally log the appropriate message based on `skipSqliteSetup`. ## Testing Instructions (or ideally a Blueprint) To test this change: 1. Set up [Playground repository locally](https://github.com/wojtekn/wordpress-playground/blob/trunk/README.md#running-wordpress-playground-locally) 2. Run the CLI with `--skip-sqlite-setup` flag and verify the log shows "Skipping..." message 3. Run the CLI without the flag and verify it shows "Fetching..." message Example commands: ```bash # Should show "Skipping SQLite integration plugin setup..." node --no-warnings=ExperimentalWarning --experimental-strip-types --experimental-transform-types --import ./packages/meta/src/node-es-module-loader/register.mts ./packages/playground/cli/src/cli.ts server --skip-sqlite-setup # Should show "Fetching SQLite integration plugin..." node --no-warnings=ExperimentalWarning --experimental-strip-types --experimental-transform-types --import ./packages/meta/src/node-es-module-loader/register.mts ./packages/playground/cli/src/cli.ts server
1 parent c13d095 commit b24ed74

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

packages/playground/cli/src/blueprints-v1/blueprints-v1-handler.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,14 @@ export class BlueprintsV1Handler {
108108
);
109109
}
110110

111-
logger.log(`Fetching SQLite integration plugin...`);
112-
113-
const sqliteIntegrationPluginZip = this.args.skipSqliteSetup
114-
? undefined
115-
: await fetchSqliteIntegration(monitor);
111+
let sqliteIntegrationPluginZip;
112+
if (this.args.skipSqliteSetup) {
113+
logger.log(`Skipping SQLite integration plugin setup...`);
114+
sqliteIntegrationPluginZip = undefined;
115+
} else {
116+
logger.log(`Fetching SQLite integration plugin...`);
117+
sqliteIntegrationPluginZip = await fetchSqliteIntegration(monitor);
118+
}
116119

117120
const followSymlinks = this.args.followSymlinks === true;
118121
const trace = this.args.experimentalTrace === true;

0 commit comments

Comments
 (0)