From 08be1d840124a739deb8b8d2b09e9c7ed706ab02 Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Mon, 1 Jun 2026 15:46:48 +0200 Subject: [PATCH 1/2] fix(cli): show banner on --help to match bare `elastic` output Closes #390 Co-authored-by: Cursor --- src/cli.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/cli.ts b/src/cli.ts index 2468fed..45fb288 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -184,13 +184,14 @@ if (firstArg === 'status') { const SKIP_EARLY_CONFIG = new Set([ 'version', 'extension', 'status', ...COMPLETION_COMMAND_NAMES, ...skipConfigNames, ]) +let earlyConfig: Awaited> | undefined if (firstArg == null || !SKIP_EARLY_CONFIG.has(firstArg)) { // Parse --profile early (before Commander's full parse) so the early config load // and hideBlockedCommands can apply the correct profile-based allow-list to --help. const profileArgIdx = process.argv.indexOf('--command-profile') const earlyProfile = profileArgIdx !== -1 ? process.argv[profileArgIdx + 1] as BuiltInProfile | undefined : undefined - const earlyConfig = await loadConfig({ + earlyConfig = await loadConfig({ ...(earlyProfile != null && { profileName: earlyProfile }), }) if (earlyConfig.ok) { @@ -199,11 +200,13 @@ if (firstArg == null || !SKIP_EARLY_CONFIG.has(firstArg)) { } } +// Render the banner before --help output too, not just for bare `elastic` (#390). +program.addHelpText('before', () => + process.argv.includes('--json') || (earlyConfig?.ok === true && earlyConfig.value.banner === false) + ? '' : renderLogo(VERSION).replace(/\n$/, '') +) + if (process.argv.slice(2).length === 0) { - const earlyConfig = await loadConfig() - if (!earlyConfig?.ok || earlyConfig.value.banner !== false) { - process.stdout.write(renderLogo(VERSION)) - } program.outputHelp() process.exit(0) } From 0c8bf9c8af266fc21fe09cbf78833b6d30487930 Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Mon, 1 Jun 2026 15:48:44 +0200 Subject: [PATCH 2/2] update NOTICE.txt --- NOTICE.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NOTICE.txt b/NOTICE.txt index 826a5db..7519db8 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -64,7 +64,7 @@ released to the public npm registry; depend on it through the workspace. ------------------------------------------------------------------------ -@elastic/es-schemas@1.0.1 +@elastic/es-schemas@1.0.2 License: UNLICENSED Repository: https://github.com/elastic/cli Publisher: Elastic Client Library Maintainers @@ -1133,7 +1133,7 @@ THIS SOFTWARE. ------------------------------------------------------------------------ -yaml@2.9.0 +yaml@2.8.4 License: ISC Repository: https://github.com/eemeli/yaml Publisher: Eemeli Aro