mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Only print the "Loading resources from..." line when the output is a TTY.
Ticket #168. (CVS 939) FossilOrigin-Name: 92ded93376635f37e2f5a7a8f4077c85d5bce735
This commit is contained in:
@ -12,7 +12,7 @@
|
||||
** This file contains code to implement the "sqlite" command line
|
||||
** utility for accessing SQLite databases.
|
||||
**
|
||||
** $Id: shell.c,v 1.71 2003/04/24 01:45:04 drh Exp $
|
||||
** $Id: shell.c,v 1.72 2003/04/26 02:50:11 drh Exp $
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -47,6 +47,10 @@
|
||||
# define stifle_history(X)
|
||||
#endif
|
||||
|
||||
/* Make sure isatty() has a prototype.
|
||||
*/
|
||||
extern int isatty();
|
||||
|
||||
/*
|
||||
** The following is the open SQLite database. We make a pointer
|
||||
** to this database a static variable so that it can be accessed
|
||||
@ -1046,7 +1050,7 @@ static void process_sqliterc(struct callback_data *p, char *sqliterc_override){
|
||||
free(home_dir);
|
||||
}
|
||||
in = fopen(sqliterc,"r");
|
||||
if(in) {
|
||||
if(in && isatty(fileno(stdout))) {
|
||||
printf("Loading resources from %s\n",sqliterc);
|
||||
process_input(p,in);
|
||||
fclose(in);
|
||||
@ -1182,7 +1186,6 @@ int main(int argc, char **argv){
|
||||
}
|
||||
}
|
||||
}else{
|
||||
extern int isatty();
|
||||
if( isatty(fileno(stdout)) && isatty(fileno(stdin)) ){
|
||||
char *zHome;
|
||||
char *zHistory = 0;
|
||||
|
Reference in New Issue
Block a user