diff --git a/apps/gdalinfo_bin.cpp b/apps/gdalinfo_bin.cpp index 3bbd4f512e1a..c3e7ece1ce6d 100644 --- a/apps/gdalinfo_bin.cpp +++ b/apps/gdalinfo_bin.cpp @@ -76,6 +76,11 @@ MAIN_START(argc, argv) GDALInfoOptionsForBinary sOptionsForBinary; + if (CSLFindString(argv, "-stdout") < 0) + { + argv = CSLAddString(argv, "-stdout"); + } + std::unique_ptr psOptions{ GDALInfoOptionsNew(argv + 1, &sOptionsForBinary), GDALInfoOptionsFree}; CSLDestroy(argv);