We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a39a04 commit 63bb93fCopy full SHA for 63bb93f
src/core/os.c
@@ -1437,11 +1437,11 @@ JANET_CORE_FN(os_isatty,
1437
FILE *f = (argc == 1) ? janet_getfile(argv, 0, NULL) : stdout;
1438
#ifdef JANET_WINDOWS
1439
int fd = _fileno(f);
1440
- if (fd == -1) janet_panicv(janet_ev_lasterr());
+ if (fd == -1) janet_panic("not a valid stream");
1441
return janet_wrap_boolean(_isatty(fd));
1442
#else
1443
int fd = fileno(f);
1444
+ if (fd == -1) janet_panic(strerror(errno));
1445
return janet_wrap_boolean(isatty(fd));
1446
#endif
1447
}
0 commit comments