Skip to content

Commit fdcda30

Browse files
authored
exit on ctrl-c (#156)
1 parent dfa27e0 commit fdcda30

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/sqlcmd/sqlcmd.go

+3
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ func (s *Sqlcmd) Run(once bool, processAll bool) error {
151151
lastError = err
152152
}
153153
}
154+
if err == ErrCtrlC {
155+
os.Exit(0)
156+
}
154157
if err != nil && err != io.EOF && s.Connect.ExitOnError {
155158
// If the error were due to a SQL error, the GO command handler
156159
// would have set ExitCode already

0 commit comments

Comments
 (0)