improve description of password prompting
Since the user does not know whether it will run su or sudo, indicate whether the password prompt will be for root or the user's password, when possible. I assume that programs like gksu that can prompt for either depending on system setup will make clear in their prompt what they're asking for.
This commit is contained in:
parent
10e4d93212
commit
e92f2d1080
4 changed files with 70 additions and 22 deletions
|
@ -49,10 +49,12 @@ start os = do
|
|||
Just userid -> go uuid userid
|
||||
else do
|
||||
showStart "enable-tor" ""
|
||||
showLongNote "Need root access to enable tor..."
|
||||
gitannex <- liftIO readProgramFile
|
||||
let ps = [Param (cmdname cmd), Param (show curruserid)]
|
||||
ifM (liftIO $ runAsRoot gitannex ps)
|
||||
sucommand <- liftIO $ mkSuCommand gitannex ps
|
||||
maybe noop showLongNote
|
||||
(describePasswordPrompt' sucommand)
|
||||
ifM (liftIO $ runSuCommand sucommand)
|
||||
( next $ next checkHiddenService
|
||||
, giveup $ unwords $
|
||||
[ "Failed to run as root:" , gitannex ] ++ toCommand ps
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue