-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
Description
When running JSS with --single-user-name followed directly by another flag (like --idp), the CLI silently accepts the flag as the username value instead of warning or erroring.
Steps to Reproduce
jss start --single-user-name --idp --idp-issuer https://example.com/Expected Behavior
The CLI should either:
- Error with a message like:
Error: --single-user-name requires a value - Or warn:
Warning: username "--idp" looks like a flag. Did you forget to provide a value?
Actual Behavior
- JSS silently uses
--idpas the username - The
--idpflag is not recognized as enabling the identity provider - The OIDC endpoints (
/.well-known/openid-configuration) return 404 - Users see confusing errors like:
Dynamic Registration could not be completed because the issuer has no registration endpoint
The startup message shows:
Single-user: --idp (registration disabled)
...indicating --idp was interpreted as the username, not as a flag.
Suggested Fix
Add validation in the CLI argument parsing:
if (username && username.startsWith('--')) {
console.error(`Error: --single-user-name value "${username}" looks like a flag.`);
console.error('Did you forget to provide a username? Example: --single-user-name melvin');
process.exit(1);
}Environment
- JSS version: 0.0.79
- Node.js: v22.21.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers