Package: ruby-gettext / 3.0.2-2~bpo70+1

0001-Properly-handle-a-closed-stdin-when-prompting-in-msg.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= <lunar@debian.org>
Date: Sun, 1 Sep 2013 19:15:42 +0200
Subject: Properly handle a closed stdin when prompting in msginit

---
 lib/gettext/tools/msginit.rb |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/gettext/tools/msginit.rb b/lib/gettext/tools/msginit.rb
index 49247fd..69b2551 100644
--- a/lib/gettext/tools/msginit.rb
+++ b/lib/gettext/tools/msginit.rb
@@ -216,6 +216,8 @@ module GetText
       end
 
       def prompt(message, default)
+        return default if $stdin.eof?
+
         print(message)
         print(" [#{default}]") if default
         print(": ")