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