Skip to content

Prevent service config from always running in headless mode when using root flags#1044

Merged
0xfornax merged 1 commit intomasterfrom
fix-tui
Mar 18, 2026
Merged

Prevent service config from always running in headless mode when using root flags#1044
0xfornax merged 1 commit intomasterfrom
fix-tui

Conversation

@thomaspanf
Copy link
Member

In urfave-v3, c.NumFlags() on a subcommand counts all the flags in the hierarchy, including root flags.

If you are using native mode (-c and -d root flags) or use a custom config path (using the -c root flag), the TUI will not launch because c.NumFlags() in urfave-v3 counts the root flags.

before this fix:

staker@node:~/dev/smartnode/rocketpool-cli$ rp5 service config


after:

staker@node:~/dev/smartnode/rocketpool-cli$ rp5 service config
(TUI launches) 

@thomaspanf thomaspanf changed the title Prevent TUI from always running in headless mode Prevent service config from always running in headless mode when using root flags Mar 18, 2026
@github-actions
Copy link

Coverage Report

@github-actions
Copy link

Coverage Report

@github-actions
Copy link

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/rocket-pool/smartnode/rocketpool-cli/service 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/rocket-pool/smartnode/rocketpool-cli/service/commands.go 0.00% (ø) 935 0 935

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

@0xfornax 0xfornax merged commit c8c111a into master Mar 18, 2026
6 checks passed
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.

2 participants