don't show confirmation prompt for Commit and Rollback in tutd
commite953d53a00ac56754c19fabb33155852b2d2e291
authorAgentM <agentm@themactionfaction.com>
dateTue 26 Sep 2017, 23:13 (9 years ago)
parent5c038e4
src/bin/TutorialD/Interpreter.hs+1−1
@@ -123,7 +123,7 @@ evalTutorialDInteractive sessionId conn safe interactive expr = case expr of
123123 cancel <- runInputT settings $ do
124124 let promptDiscardChanges = do
125125 isatty <- haveTerminalUI
126− if isatty && interactive then do
126+ if isatty && interactive && execOp /= Rollback && execOp /= Commit then do
127127 mYesOrNo <- getInputLine "The current transaction has uncommitted changes. If you continue, the changes will be lost. Continue? (Y/n): "
128128 case mYesOrNo of
129129 Nothing -> promptDiscardChanges