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 da09ac9 commit 5f106e8Copy full SHA for 5f106e8
src/core/log.ts
@@ -470,11 +470,20 @@ export async function logPandocJson(
470
return logPandoc(src, "json");
471
}
472
473
+const getColumns = () => {
474
+ try {
475
+ // Catch error in none tty mode: Inappropriate ioctl for device (os error 25)
476
+ return Deno.consoleSize().columns ?? 130;
477
+ } catch (_error) {
478
+ return 130;
479
+ }
480
+};
481
+
482
export async function logPandoc(
483
src: string,
484
format: string = "markdown",
485
) {
- const cols = Deno.consoleSize().columns;
486
+ const cols = getColumns();
487
const result = await execProcess({
488
cmd: [
489
pandocBinaryPath(),
0 commit comments