- /* we also support reading targets from stdin */
- if(!isatty(fileno(stdin))) {
+ /* we support reading targets from stdin if the only arg is '-' */
+ if(!isatty(fileno(stdin) && alpm_list_count(pm_targets) == 1 &&
+ strcmp(alpm_list_getdata(pm_targets), "-") == 0)) {
char line[PATH_MAX];
int i = 0;
while(i < PATH_MAX && (line[i] = (char)fgetc(stdin)) != EOF) {
--
1.7.4.1