mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-15 22:44:41 +00:00
abilint: Add prompt message for abnormal operation
When using abilint, if the user provides the --stdin option as well as a file path on the command line, the file path is silently ignored. This patch provides a warning to notify the user that the file path is ignored in that case. * tools/abilint.cc (parse_command_line): Notify the user when the path to the file is ignored because the --stdin option was provided. Signed-off-by: tangmeng <tangmeng@uniontech.com> Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
d71d76db21
commit
c36f8028fd
@ -205,6 +205,14 @@ parse_command_line(int argc, char* argv[], options& opts)
|
||||
|
||||
if (opts.file_path.empty())
|
||||
opts.read_from_stdin = true;
|
||||
|
||||
if (opts.read_from_stdin && !opts.file_path.empty())
|
||||
{
|
||||
emit_prefix(argv[0], cout)
|
||||
<< "WARNING: The \'--stdin\' option is used. The "
|
||||
<< opts.file_path << " will be ignored automatically\n";
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user