feat: allow -r without argument, defaulting to 0 by dlevy-msft-sql · Pull Request #635 · microsoft/go-sqlcmd
dlevy-msft-sql added a commit to dlevy-msft-sql/go-sqlcmd that referenced this pull request
Jan 25, 2026
dlevy-msft-sql
changed the title
Allow -r without argument, defaulting to 0
feat: allow -r without argument, defaulting to 0
ODBC sqlcmd allows -r without an explicit value, defaulting to 0 (enable stderr redirection for severity >= 11). Previously go-sqlcmd required -r0 or -r1 explicitly. Changes: - normalizeFlags: Accept empty value for -r flag - getOptionalIntArgument: Return 0 for empty value instead of -1 - Add tests for bare -r flag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters