noise-tool: don't check tty until after options
options may include a help request which we'll want to respond to before checking the output stream.
This commit is contained in:
parent
736fe9a156
commit
ee401e4409
@ -164,13 +164,6 @@ operator<< (std::ostream &os, lerp_t &l)
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
#if !defined(ENABLE_DEBUGGING) and !defined(PLATFORM_WIN32)
|
||||
if (isatty (fileno (stdout))) {
|
||||
std::cerr << "cowardly refusing to dump binary data to console\n";
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
#endif
|
||||
|
||||
// setup default variables
|
||||
#ifdef ENABLE_DEBUGGING
|
||||
util::extent2u res {320, 240};
|
||||
@ -215,6 +208,13 @@ main (int argc, char **argv)
|
||||
|
||||
args.scan (argc, argv);
|
||||
|
||||
#if !defined(ENABLE_DEBUGGING) and !defined(PLATFORM_WIN32)
|
||||
if (isatty (fileno (stdout))) {
|
||||
std::cerr << "cowardly refusing to dump binary data to console\n";
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
#endif
|
||||
|
||||
util::noise::turbulence<
|
||||
float,
|
||||
util::noise::fractal::runtime<
|
||||
|
Loading…
Reference in New Issue
Block a user