mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-16 06:15:08 -05:00
VMiklos: --noconfirm fix
This commit is contained in:
parent
9a7190dfff
commit
953e7e5d3e
@ -36,8 +36,11 @@
|
|||||||
|
|
||||||
/* pacman */
|
/* pacman */
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
#include "list.h"
|
||||||
|
#include "conf.h"
|
||||||
|
|
||||||
extern int maxcols;
|
extern int maxcols;
|
||||||
|
extern config_t *config;
|
||||||
|
|
||||||
/* does the same thing as 'mkdir -p' */
|
/* does the same thing as 'mkdir -p' */
|
||||||
int makepath(char *path)
|
int makepath(char *path)
|
||||||
@ -192,6 +195,8 @@ int yesno(char *fmt, ...)
|
|||||||
char response[32];
|
char response[32];
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
|
if(!config->noconfirm)
|
||||||
|
{
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
vprintf(fmt, args);
|
vprintf(fmt, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
@ -217,6 +222,9 @@ int yesno(char *fmt, ...)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(0);
|
return(0);
|
||||||
|
} else {
|
||||||
|
return(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* match a string against a regular expression */
|
/* match a string against a regular expression */
|
||||||
|
Loading…
Reference in New Issue
Block a user