﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26751	Make dbshell exit with the shell's error code	Étienne BERSAC	nobody	"For scripting, commands should return a non zero exit-code on error. But `dbshell` seems to ignore the exit code. Here is how to reproduce:

{{{
#!console
(venv) $ echo 'auieaui;' | django-admin dbshell
ERROR:  syntax error at or near ""auieaui""
LINE 1: auieaui;
        ^
(venv) $ echo $?
0
}}}

I suggested a fix in https://github.com/django/django/pull/6768 . @charettes asked me to open a ticket for discussion. Here your are :)

Regards,
Étienne"	Cleanup/optimization	new	Core (Management commands)	dev	Normal		dbshell		Accepted	1	0	0	1	0	0
