1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-06 15:49:35 +03:00

Update the command-line shell to give an exit code of 0 when the ".quit"

command is run from the command-line.

FossilOrigin-Name: 467e218120d63d0f34c447f7324bac1364ac0eac
This commit is contained in:
drh
2013-04-17 12:19:48 +00:00
parent d16d0bc58b
commit 99b390827b
3 changed files with 9 additions and 8 deletions

View File

@@ -3166,7 +3166,7 @@ int main(int argc, char **argv){
z = cmdline_option_value(argc,argv,++i);
if( z[0]=='.' ){
rc = do_meta_command(z, &data);
if( rc && bail_on_error ) return rc;
if( rc && bail_on_error ) return rc==2 ? 0 : rc;
}else{
open_db(&data);
rc = shell_exec(data.db, z, shell_callback, &data, &zErrMsg);
@@ -3190,6 +3190,7 @@ int main(int argc, char **argv){
*/
if( zFirstCmd[0]=='.' ){
rc = do_meta_command(zFirstCmd, &data);
if( rc==2 ) rc = 0;
}else{
open_db(&data);
rc = shell_exec(data.db, zFirstCmd, shell_callback, &data, &zErrMsg);