Skip to content

Accept --session before subcommands in profiler-cli - #6358

Open
fatadel wants to merge 2 commits into
firefox-devtools:mainfrom
fatadel:issue-6357
Open

fatadel wants to merge 2 commits into
firefox-devtools:mainfrom
fatadel:issue-6357

Conversation

@fatadel

@fatadel fatadel commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Main | Deploy preview

The CLI rejects --session before the command, requiring scripts to place it after the subcommand. Register it globally so both forms work:

profiler-cli --session my-analysis profile info
profiler-cli profile info --session my-analysis

Fixes #6357

Move the session option definition into addSessionOption so the root
command can share its spelling and help text with individual commands.
Register --session on the root command and pass its value to command
actions so scripts can place session selection before the command.
@fatadel
fatadel requested review from canova and mstange September 25, 2026 17:17
@codecov

codecov Bot commented Sep 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.12%. Comparing base (c9c049c) to head (b63a8f2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6358   +/-   ##
=======================================
  Coverage   84.12%   84.12%           
=======================================
  Files         356      356           
  Lines       38445    38445           
  Branches    10888    10888           
=======================================
  Hits        32340    32340           
  Misses       5676     5676           
  Partials      429      429           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread profiler-cli/guide.txt
profiler-cli profile info --session my-analysis
profiler-cli thread select t-0 --session my-analysis

The --session option can also appear before the command:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's the point of adding these lines to the guide? The fact this bug was reported in the first place means some sessions tried to put the session parameter there already.

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.

--session rejected before the subcommand for profiler-cli

3 participants