Skip to content

Commit

Permalink
Suppress output of auto select info in API mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco van Wieringen committed Nov 16, 2015
1 parent ca3f777 commit 1c77dd5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/dird/ua_select.c
Original file line number Diff line number Diff line change
Expand Up @@ -853,8 +853,7 @@ void add_prompt(UAContext *ua, const char *prompt)
* index base 0 on success, and choice is copied to prompt if not NULL
* prompt is set to the chosen prompt item string
*/
int do_prompt(UAContext *ua, const char *automsg, const char *msg,
char *prompt, int max_prompt)
int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
{
int i, item;
POOL_MEM pmsg(PM_MESSAGE);
Expand All @@ -868,7 +867,9 @@ int do_prompt(UAContext *ua, const char *automsg, const char *msg,
if (prompt) {
bstrncpy(prompt, ua->prompt[1], max_prompt);
}
ua->send_msg(_("Automatically selected %s: %s\n"), automsg, ua->prompt[1]);
if (!ua->api) {
ua->send_msg(_("Automatically selected %s: %s\n"), automsg, ua->prompt[1]);
}
goto done;
}
/* If running non-interactive, bail out */
Expand Down

0 comments on commit 1c77dd5

Please sign in to comment.