Commit 0469aba7 authored by Ryan Scott's avatar Ryan Scott
Browse files

Depend on echo to fix #4128

parent 09865f60
......@@ -18,9 +18,9 @@ import qualified Distribution.Client.BuildReports.Upload as BuildReport
import Network.URI (URI(uriPath))
import Network.HTTP (Header(..), HeaderName(..))
import System.IO (hFlush, stdin, stdout, hGetEcho, hSetEcho)
import System.IO (hFlush, stdout)
import System.IO.Echo (withoutInputEcho)
import System.Exit (exitFailure)
import Control.Exception (bracket)
import System.FilePath ((</>), takeExtension, takeFileName, dropExtension)
import qualified System.FilePath.Posix as FilePath.Posix ((</>))
import System.Directory
......@@ -140,10 +140,8 @@ promptPassword :: IO Password
promptPassword = do
putStr "Hackage password: "
hFlush stdout
-- save/restore the terminal echoing status
passwd <- bracket (hGetEcho stdin) (hSetEcho stdin) $ \_ -> do
hSetEcho stdin False -- no echoing for entering the password
fmap Password getLine
-- save/restore the terminal echoing status (no echoing for entering the password)
passwd <- withoutInputEcho $ fmap Password getLine
putStrLn ""
return passwd
......
......@@ -259,6 +259,8 @@ BASE64_BYTESTRING_VER="1.0.0.1"; BASE64_BYTESTRING_VER_REGEXP="1\."
# >=1.0
CRYPTOHASH_SHA256_VER="0.11.100.1"; CRYPTOHASH_SHA256_VER_REGEXP="0\.11\.?"
# 0.11.*
ECHO_VER="0.1"; ECHO_VER_REGEXP="0\.1\.?"
# 0.1.*
EDIT_DISTANCE_VER="0.2.2.1"; EDIT_DISTANCE_VER_REGEXP="0\.2\.2\.?"
# 0.2.2.*
ED25519_VER="0.0.5.0"; ED25519_VER_REGEXP="0\.0\.?"
......@@ -485,6 +487,7 @@ info_pkg "base64-bytestring" ${BASE64_BYTESTRING_VER} \
${BASE64_BYTESTRING_VER_REGEXP}
info_pkg "cryptohash-sha256" ${CRYPTOHASH_SHA256_VER} \
${CRYPTOHASH_SHA256_VER_REGEXP}
info_pkg "echo" ${ECHO_VER} ${ECHO_VER_REGEXP}
info_pkg "edit-distance" ${EDIT_DISTANCE_VER} ${EDIT_DISTANCE_VER_REGEXP}
info_pkg "ed25519" ${ED25519_VER} ${ED25519_VER_REGEXP}
info_pkg "tar" ${TAR_VER} ${TAR_VER_REGEXP}
......@@ -521,6 +524,7 @@ do_pkg "base64-bytestring" ${BASE64_BYTESTRING_VER} \
${BASE64_BYTESTRING_VER_REGEXP}
do_pkg "cryptohash-sha256" ${CRYPTOHASH_SHA256_VER} \
${CRYPTOHASH_SHA256_VER_REGEXP}
do_pkg "echo" ${ECHO_VER} ${ECHO_VER_REGEXP}
do_pkg "edit-distance" ${EDIT_DISTANCE_VER} ${EDIT_DISTANCE_VER_REGEXP}
do_pkg "ed25519" ${ED25519_VER} ${ED25519_VER_REGEXP}
......
......@@ -349,6 +349,7 @@ executable cabal
containers >= 0.4 && < 0.6,
cryptohash-sha256 >= 0.11 && < 0.12,
deepseq >= 1.3 && < 1.5,
echo >= 0.1 && < 0.2,
edit-distance >= 0.2.2 && < 0.3,
filepath >= 1.3 && < 1.5,
hashable >= 1.0 && < 2,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment