From: Joey Hess Date: Mon, 23 Sep 2024 19:04:33 +0000 (-0400) Subject: allow complex shell commands X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~21^2~25^2~19 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6b040ed32de7f960170a33a016cdf6cdccd11566;p=git-annex.git allow complex shell commands --- diff --git a/Annex/Sim.hs b/Annex/Sim.hs index 7e2f6a8071..b57148ccac 100644 --- a/Annex/Sim.hs +++ b/Annex/Sim.hs @@ -287,11 +287,11 @@ applySimCommand c@(CommandVisit repo cmdparams) st _ = unlessM (liftIO $ doesDirectoryExist dir) $ giveup "Simulated repository unavailable." (cmd, params) <- case cmdparams of - (cmd:params) -> return (cmd, params) [] -> do showLongNote "Starting a shell in the simulated repository." shellcmd <- liftIO $ fromMaybe "sh" <$> getEnv "SHELL" return (shellcmd, []) + _ -> return ("sh", ["-c", unwords cmdparams]) exitcode <- liftIO $ safeSystem' cmd (map Param params) (\p -> p { cwd = Just dir })