allow complex shell commands
This commit is contained in:
parent
5a4bee24b8
commit
6b040ed32d
1 changed files with 1 additions and 1 deletions
|
@ -287,11 +287,11 @@ applySimCommand c@(CommandVisit repo cmdparams) st _ =
|
||||||
unlessM (liftIO $ doesDirectoryExist dir) $
|
unlessM (liftIO $ doesDirectoryExist dir) $
|
||||||
giveup "Simulated repository unavailable."
|
giveup "Simulated repository unavailable."
|
||||||
(cmd, params) <- case cmdparams of
|
(cmd, params) <- case cmdparams of
|
||||||
(cmd:params) -> return (cmd, params)
|
|
||||||
[] -> do
|
[] -> do
|
||||||
showLongNote "Starting a shell in the simulated repository."
|
showLongNote "Starting a shell in the simulated repository."
|
||||||
shellcmd <- liftIO $ fromMaybe "sh" <$> getEnv "SHELL"
|
shellcmd <- liftIO $ fromMaybe "sh" <$> getEnv "SHELL"
|
||||||
return (shellcmd, [])
|
return (shellcmd, [])
|
||||||
|
_ -> return ("sh", ["-c", unwords cmdparams])
|
||||||
exitcode <- liftIO $
|
exitcode <- liftIO $
|
||||||
safeSystem' cmd (map Param params)
|
safeSystem' cmd (map Param params)
|
||||||
(\p -> p { cwd = Just dir })
|
(\p -> p { cwd = Just dir })
|
||||||
|
|
Loading…
Reference in a new issue