Skip to content

feat(gui): improve CLI help output and argument validation#10069

Open
joshtrichards wants to merge 8 commits into
masterfrom
jtr/fix-cli-parser-overridelocaldir
Open

feat(gui): improve CLI help output and argument validation#10069
joshtrichards wants to merge 8 commits into
masterfrom
jtr/fix-cli-parser-overridelocaldir

Conversation

@joshtrichards
Copy link
Copy Markdown
Member

@joshtrichards joshtrichards commented May 20, 2026

Summary

Make the GUI's command-line interface easier to use by improving the help text and tightening argument parsing.

Changes

  • rewrite the --help output into clearer grouped sections
  • clarify descriptions for setup wizard and non-interactive provisioning options
  • refactor: group related options logic more clearly in parseOptions()
  • refactor: simplify option matching in parseOptions() with small local helpers
  • report missing values more consistently for value-taking options
  • reject invalid --logexpire values instead of silently treating them as 0
  • document known follow-up areas around --reverse and --overridelocaldir

Notes

  • this is intended as a low-risk cleanup of CLI help and parsing logic
  • delegated command-line parsing via AccountSetupCommandLineManager is unchanged
  • no intended behavior changes beyond clearer errors and stricter --logexpire validation

Follow-up

Potential follow-ups kept out of this PR:

  • decide whether --reverse should set RTL unconditionally
  • validate the path passed to --overridelocaldir
  • revisit whether path-like option values beginning with -- should be accepted
  • validate what --background does and does not do and set expectations accordingly in the help text/etc and address [Bug]: --background not working #5916

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
showHint() calls exit itself.

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added feature: ☁️ GUI System tray icon and menu. 2. developing labels May 20, 2026
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
22 New Code Smells (required ≤ 0)
D Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@github-actions
Copy link
Copy Markdown

Artifact containing the AppImage: nextcloud-appimage-pr-10069.zip

Digest: sha256:da223dddf688f2278cbf412b02a858509e2d1f4120b7f1977698784d6dc19e95

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@joshtrichards joshtrichards marked this pull request as ready for review May 20, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review feature: ☁️ GUI System tray icon and menu.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant