From efe88939a9f83303acd48b621aa6732c4f04af21 Mon Sep 17 00:00:00 2001 From: Schneems Date: Wed, 20 Nov 2024 16:39:38 -0600 Subject: [PATCH] Capture warning in IO --- CHANGELOG.md | 2 ++ lib/rundoc/cli.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9900553..308c167 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## HEAD +- Fix: Partial output of the document is now written to disk in a `RUNDOC_FAILED.md` file (https://github.com/zombocom/rundoc/pull/69) + ## 3.0.1 - Fix: Save in-progress work in the "failure" directory when the rundoc command is interrupted via a signal such as `SIGTERM` (https://github.com/zombocom/rundoc/pull/67) diff --git a/lib/rundoc/cli.rb b/lib/rundoc/cli.rb index 173e4b5..1426a8d 100644 --- a/lib/rundoc/cli.rb +++ b/lib/rundoc/cli.rb @@ -152,7 +152,7 @@ def call output = begin parser.to_md rescue StandardError, SignalException => e - warn "Received exception: #{e.inspect}, cleaning up before re-raise" + io.puts "Received exception: #{e.inspect}, cleaning up before re-raise" on_fail raise e end