fix over-shell-escape
Seems I had one time too many.
This commit is contained in:
parent
faecd73f32
commit
c9578be5b2
1 changed files with 5 additions and 11 deletions
16
Git/Ssh.hs
16
Git/Ssh.hs
|
@ -47,22 +47,16 @@ gitSsh host mp cmd = do
|
||||||
, Param c
|
, Param c
|
||||||
]
|
]
|
||||||
, gitps
|
, gitps
|
||||||
-- cmd is already shell escaped
|
|
||||||
-- for the remote side, but needs to be
|
|
||||||
-- shell-escaped once more since it's
|
|
||||||
-- passed through the local shell.
|
|
||||||
, [ Param $ shellEscape $ cmd ]
|
|
||||||
]
|
]
|
||||||
| otherwise -> ret c [ gitps, [Param cmd]]
|
| otherwise -> ret c [gitps]
|
||||||
Nothing -> do
|
Nothing -> do
|
||||||
gs <- getEnv gitSshEnv
|
gs <- getEnv gitSshEnv
|
||||||
case gs of
|
case gs of
|
||||||
Just c -> ret c [ gitps, [Param cmd]]
|
Just c -> ret c [gitps]
|
||||||
Nothing -> return Nothing
|
Nothing -> return Nothing
|
||||||
where
|
where
|
||||||
-- git passes exactly these parameters, followed by another
|
-- git passes exactly these parameters
|
||||||
-- parameter containing the remote command.
|
|
||||||
gitps = map Param $ case mp of
|
gitps = map Param $ case mp of
|
||||||
Nothing -> [host]
|
Nothing -> [host, cmd]
|
||||||
Just p -> [host, "-p", show p]
|
Just p -> [host, "-p", show p, cmd]
|
||||||
ret c ll = return $ Just (c, concat ll)
|
ret c ll = return $ Just (c, concat ll)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue