mirror of https://github.com/ecmwf/eccodes.git
Tools: print stdin if input filter is '-'
This commit is contained in:
parent
2e295d5674
commit
0d04b7aa9a
|
@ -55,7 +55,9 @@ int grib_tool_init(grib_runtime_options* options)
|
|||
{
|
||||
options->action = grib_action_from_filter(options->infile_extra->name);
|
||||
if (!options->action) {
|
||||
fprintf(stderr, "%s: error unable to create action\n", options->infile_extra->name);
|
||||
const char* filt = options->infile_extra->name;
|
||||
if (strcmp(filt, "-")==0) filt = "stdin";
|
||||
fprintf(stderr, "Error: %s: unable to create action\n", filt);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,9 @@ int grib_tool_init(grib_runtime_options* options)
|
|||
{
|
||||
options->action = grib_action_from_filter(options->infile_extra->name);
|
||||
if (!options->action) {
|
||||
fprintf(stderr, "%s: error unable to create action\n", options->infile_extra->name);
|
||||
const char* filt = options->infile_extra->name;
|
||||
if (strcmp(filt, "-")==0) filt = "stdin";
|
||||
fprintf(stderr, "Error: %s: unable to create action\n", filt);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue