2014-11-12 19:41:15 +00:00
|
|
|
{- git-annex command
|
|
|
|
-
|
2015-01-21 16:50:09 +00:00
|
|
|
- Copyright 2014 Joey Hess <id@joeyh.name>
|
2014-11-12 19:41:15 +00:00
|
|
|
-
|
2019-03-13 19:48:14 +00:00
|
|
|
- Licensed under the GNU AGPL version 3 or higher.
|
2014-11-12 19:41:15 +00:00
|
|
|
-}
|
|
|
|
|
|
|
|
module Command.Proxy where
|
|
|
|
|
|
|
|
import Command
|
|
|
|
|
2015-07-08 16:33:27 +00:00
|
|
|
cmd :: Command
|
|
|
|
cmd = notBareRepo $
|
2015-07-08 19:08:02 +00:00
|
|
|
command "proxy" SectionPlumbing
|
2019-08-26 18:52:55 +00:00
|
|
|
"safely bypass direct mode guard (deprecated)"
|
2015-07-08 19:08:02 +00:00
|
|
|
("-- git command") (withParams seek)
|
2014-11-12 19:41:15 +00:00
|
|
|
|
2015-07-08 19:08:02 +00:00
|
|
|
seek :: CmdParams -> CommandSeek
|
2018-10-01 18:12:06 +00:00
|
|
|
seek = withWords (commandAction . start)
|
2014-11-12 19:41:15 +00:00
|
|
|
|
|
|
|
start :: [String] -> CommandStart
|
2016-11-16 01:29:54 +00:00
|
|
|
start [] = giveup "Did not specify command to run."
|
2019-08-26 18:52:55 +00:00
|
|
|
start (c:ps) = liftIO $ exitWith =<< safeSystem c (map Param ps)
|