Prevent EmptyStackException in case no stack of prompts is empty
This commit is contained in:
@@ -43,7 +43,9 @@ public class ShellPrompts {
|
||||
* @see #pushPrompt(String)
|
||||
*/
|
||||
public void popPrompt() {
|
||||
this.prompts.pop();
|
||||
if (!this.prompts.isEmpty()) {
|
||||
this.prompts.pop();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user