mirror of
https://github.com/redelmann/scat
synced 2025-01-10 06:34:20 +01:00
Minor code quality changes.
This commit is contained in:
parent
3edbc3421d
commit
6608dce71e
@ -71,7 +71,7 @@ getPassword = do
|
|||||||
getPassConfirm = do
|
getPassConfirm = do
|
||||||
a <- askPassword "Password: "
|
a <- askPassword "Password: "
|
||||||
b <- askPassword "Confirm: "
|
b <- askPassword "Confirm: "
|
||||||
if (a == b)
|
if a == b
|
||||||
then return a
|
then return a
|
||||||
else do
|
else do
|
||||||
printVerbose "Passwords do not match, please retry.\n"
|
printVerbose "Passwords do not match, please retry.\n"
|
||||||
@ -81,7 +81,7 @@ askPassword :: String -> Scat C.ByteString
|
|||||||
askPassword str = do
|
askPassword str = do
|
||||||
printVerbose str
|
printVerbose str
|
||||||
old <- liftIO $ hGetEcho stdin
|
old <- liftIO $ hGetEcho stdin
|
||||||
pw <- liftIO $ bracket_
|
pw <- liftIO $ bracket_
|
||||||
(hSetEcho stdin False)
|
(hSetEcho stdin False)
|
||||||
(hSetEcho stdin old)
|
(hSetEcho stdin old)
|
||||||
C.getLine
|
C.getLine
|
||||||
|
Loading…
Reference in New Issue
Block a user