From 6b040ed32de7f960170a33a016cdf6cdccd11566 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 23 Sep 2024 15:04:33 -0400 Subject: [PATCH] allow complex shell commands --- Annex/Sim.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 })