Skip to content

Fix CLI installer argument parsing treating flags as positional args#787

Merged
erikdarlingdata merged 1 commit intodevfrom
fix/786-installer-arg-parsing
Apr 4, 2026
Merged

Fix CLI installer argument parsing treating flags as positional args#787
erikdarlingdata merged 1 commit intodevfrom
fix/786-installer-arg-parsing

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

  • Flags like --encrypt optional (space-separated) weren't fully stripped from positional args, causing the installer to treat them as a username and fall into the SQL Auth path
  • Replaced individual flag filters with a single loop that strips all -- prefixed flags and consumes trailing values for --entra and --encrypt
  • Now supports both --encrypt=optional and --encrypt optional

Fixes #786

Test plan

  • Builds clean
  • SERVERNAME --trust-cert --encrypt=optional → 1 positional arg → Windows Auth
  • SERVERNAME --trust-cert --encrypt optional → 1 positional arg → Windows Auth
  • SERVERNAME sa password --trust-cert → 3 positional args → SQL Auth

🤖 Generated with Claude Code

Flags like --encrypt optional (space-separated) were not fully stripped
from positional arguments, causing the installer to misinterpret them as
a username and fall into the SQL Auth path unexpectedly.

Replace individual flag filters with a single loop that strips all --
prefixed flags and consumes trailing values for --entra and --encrypt.
Also support --encrypt <level> (space) in addition to --encrypt=<level>.

Fixes #786

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 77f8f6e into dev Apr 4, 2026
3 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.

1 participant