Skip to content

[codex] Support root bl --version#313

Merged
mstolarzblaxelai merged 1 commit into
mainfrom
mstolarz/eng-2800-support-root-bl-version
Jun 4, 2026
Merged

[codex] Support root bl --version#313
mstolarzblaxelai merged 1 commit into
mainfrom
mstolarz/eng-2800-support-root-bl-version

Conversation

@mstolarzblaxelai
Copy link
Copy Markdown
Contributor

@mstolarzblaxelai mstolarzblaxelai commented Jun 3, 2026

  • Adds root-level bl --version support while preserving -v as verbose.
  • Keeps bl version as the detailed version output with commit and build date.
  • Skips the tracking prompt for root version checks so install and agent probes stay non-interactive.

Fixes https://linear.app/blaxel/issue/ENG-2800/support-root-bl-version-in-the-cli


Note

Moves version/commit/date initialization earlier in Execute() (before promptForTracking()) and sets rootCmd.Version to enable cobra's built-in --version flag. Adds --version to the tracking prompt exemption list via a new isTrackingPromptCommandExempt helper.

Written by Mendral for commit c2f3dde.

Copy link
Copy Markdown
Contributor

@mendral-app mendral-app Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

The change is correct. Version vars are initialized and rootCmd.Version is set before promptForTracking(), which is exactly what's needed for --version to work non-interactively. Cobra adds --version lazily during Execute(), so there's no conflict with the -v verbose shorthand registered at line 395.

Tag @mendral-app with feedback or questions. View session

@mstolarzblaxelai mstolarzblaxelai marked this pull request as ready for review June 3, 2026 23:48
@mstolarzblaxelai mstolarzblaxelai merged commit 8e479d4 into main Jun 4, 2026
7 checks passed
@mstolarzblaxelai mstolarzblaxelai deleted the mstolarz/eng-2800-support-root-bl-version branch June 4, 2026 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant