p2phttp support --jobs with --directory
--jobs is usually an Annex option setter, but --directory runs in IO, so would not have that available. So instead moved the option parser into the command's Options.
This commit is contained in:
parent
9f84dd82da
commit
3c18398d5a
3 changed files with 30 additions and 22 deletions
|
@ -511,15 +511,19 @@ jsonProgressOption =
|
|||
-- action in `allowConcurrentOutput`.
|
||||
jobsOption :: [AnnexOption]
|
||||
jobsOption =
|
||||
[ annexOption (setAnnexState . setConcurrency . ConcurrencyCmdLine) $
|
||||
option (maybeReader parseConcurrency)
|
||||
( long "jobs" <> short 'J'
|
||||
<> metavar (paramNumber `paramOr` "cpus")
|
||||
<> help "enable concurrent jobs"
|
||||
<> hidden
|
||||
)
|
||||
[ annexOption (setAnnexState . setConcurrency . ConcurrencyCmdLine)
|
||||
jobsOptionParser
|
||||
]
|
||||
|
||||
jobsOptionParser :: Parser Concurrency
|
||||
jobsOptionParser =
|
||||
option (maybeReader parseConcurrency)
|
||||
( long "jobs" <> short 'J'
|
||||
<> metavar (paramNumber `paramOr` "cpus")
|
||||
<> help "enable concurrent jobs"
|
||||
<> hidden
|
||||
)
|
||||
|
||||
timeLimitOption :: [AnnexOption]
|
||||
timeLimitOption =
|
||||
[ annexOption settimelimit $ option (eitherReader parseDuration)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue