Skip to content

Commit 74cfa37

Browse files
basinilyamichael-o
authored andcommitted
fix EOF infinite loop
This closes #2
1 parent 94cf752 commit 74cfa37

File tree

1 file changed

+3
-0
lines changed
  • plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity

1 file changed

+3
-0
lines changed

plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/DefaultPrompter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ public String prompt( String message, List possibleValues, String defaultReply )
121121
try
122122
{
123123
line = inputHandler.readLine();
124+
if (line == null && defaultReply == null) {
125+
throw new IOException("EOF");
126+
}
124127
}
125128
catch ( IOException e )
126129
{

0 commit comments

Comments
 (0)