Skip to content

Errors for :R are thrown on stdout instead of stderr #105

Closed
@apoorvdeshmukh

Description

@apoorvdeshmukh

When compared with the ODBC based sqlcmd utility, the go-sqlcmd utility throws error for :R and all other commands to stdout instead of stderr.
This issue is created to align go-sqlcmd behavior with ODBC based sqlcmd.

Usage on ODBC sqlcmd

>type test1.sql
:r missing.sql
go

>sqlcmd -i test1.sql >stdout.txt 2>stderr.txt
stdout: <Blank>
stderr: 'missing.sql': Invalid filename.

Usage on go-sqlcmd

sqlcmd-v0.8.0-windows-x64>sqlcmd.exe -i test.sql >stdout.txt 2>stderr.txt
stdout: open missing.sql: The system cannot find the file specified.
stderr: <blank>

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions